tinkr icon indicating copy to clipboard operation
tinkr copied to clipboard

subscript text is converted to strikethrough text

Open zkamvar opened this issue 1 year ago • 2 comments

This may be a commonmark problem but it appears that it treats a single pair of ~ as strikethrough text even though it prints a double pair.

txt <- "log~10~"
xml <- tinkr::yarn$new(textConnection(txt))
xml$show()
#> log~~10~~

xml$body |> as.character() |> writeLines()
#> <?xml version="1.0" encoding="UTF-8"?>
#> <!DOCTYPE document SYSTEM "CommonMark.dtd">
#> <document xmlns="http://commonmark.org/xml/1.0">
#>   <paragraph>
#>     <text xml:space="preserve">log</text>
#>     <strikethrough>
#>       <text xml:space="preserve">10</text>
#>     </strikethrough>
#>   </paragraph>
#> </document>

Created on 2023-06-19 with reprex v2.0.2

zkamvar avatar Jun 19 '23 22:06 zkamvar