line / conflr

Post R Markdown documents to Confluence
https://line.github.io/conflr/
GNU General Public License v3.0
130 stars 28 forks source link

Dollar signs (even when escaped) cause failure #124

Open dfarnand opened 4 years ago

dfarnand commented 4 years ago

Dollar signs in the document seem to break the confl_create_post_from_Rmd process in weird ways, resulting in an error: Error parsing xhtml: Unexpected close tag </ac:structured-macro>; expected </p>.

I've narrowed it down to specific examples, which I think relate to how latex math is detected and handled.

Breaks

\$1

\$2
Works, but tries to put latex math in the first paragraph 

\$1 \$2

\$2

Double-escaping avoids the error, but makes the dollar signs appear as \$ on confluence.

Works

\\$1

\\$2

I haven't found a consistent workaround yet, except for uploading the document without dollar signs and manually adding them in via the confluence editor.

jrfarrer commented 4 years ago

Encountered this error message when using the gt package as well:

gt::fmt_currency(..., currency = "USD")

bra-fsn commented 1 year ago

Super annoying and confusing. :( For me, a single instance of $ worked, but three of them broke the upload with the above error. Tried &dollar;, without success. It turns out $0.028 and \$0.028 break, \\$0.028 works, but produces \$0.028 on the Confluence page, while \$ 0.028 (space inserted between the $ sign and the number) seems to be working.