Skip to content

Commit

Permalink
fix #929: put figure numbers in <span class="fig-number"></span>
Browse files Browse the repository at this point in the history
  • Loading branch information
yihui committed May 7, 2023
1 parent a39e8f4 commit e0c3cea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/html.R
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ parse_fig_labels = function(content, global = FALSE) {
labs[[i]] = character(length(lab))
next
}
labs[[i]] = label_prefix(type, sep = ': ')(num)
labs[[i]] = sprintf('<span class="fig-number">%s</span>', label_prefix(type, sep = ': ')(num))
k = max(figs[figs <= i])
content[k] = paste(c(content[k], sprintf('<span style="display:block;" id="%s"></span>', lab)), collapse = '')
}, tab = {
Expand Down

0 comments on commit e0c3cea

Please sign in to comment.