From 867a153d45769a17a05060f508571015cc855082 Mon Sep 17 00:00:00 2001 From: Yihui Xie Date: Mon, 8 May 2023 14:14:07 -0500 Subject: [PATCH] a hack to avoid breaking the reverse dependency flextable: https://github.com/davidgohel/flextable/pull/539 --- R/ebook.R | 2 ++ 1 file changed, 2 insertions(+) diff --git a/R/ebook.R b/R/ebook.R index 2cd0be6ab..f6ddae7ba 100644 --- a/R/ebook.R +++ b/R/ebook.R @@ -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('', 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