Skip to content

Commit

Permalink
a hack to avoid breaking the reverse dependency flextable: davidgohel…
Browse files Browse the repository at this point in the history
  • Loading branch information
yihui committed May 8, 2023
1 parent 5ecdb04 commit 867a153
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions R/ebook.R
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ resolve_refs_md = function(content, ref_table, to_md = output_md()) {
id = if (type %in% c(theorem_abbr, 'fig', 'tab')) {
sprintf('<span id="%s"></span>', j)
} else ''
# TODO: get rid of this hack https://github.com/davidgohel/flextable/pull/539
if (type == 'tab' && xfun::check_old_package('flextable', '0.9.1')) id = ''
label = label_prefix(type, sep = sep)(ref_table[j])
content[i] = sub(m, paste0(id, label, ' '), content[i])
break
Expand Down

0 comments on commit 867a153

Please sign in to comment.