Skip to content

Commit

Permalink
fix #2280: when parsing YAML chunk option, label should be an unamed …
Browse files Browse the repository at this point in the history
…value

thanks @gadenbuie
  • Loading branch information
cderv committed Aug 22, 2023
1 parent 0daa89c commit 1e51d65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/parser.R
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ partition_chunk = function(engine, code) {
}

# normalize field name 'id' to 'label' if provided
meta$label = unlist(meta[c('label', 'id')])[1]
meta$label = unlist(meta[c('label', 'id')])[[1]]
meta$id = NULL
# convert any option with fig- into fig. and out- to out.
names(meta) = sub('^(fig|out)-', '\\1.', names(meta))
Expand Down

0 comments on commit 1e51d65

Please sign in to comment.