Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

subscript text is converted to strikethrough text #99

Open
zkamvar opened this issue Jun 19, 2023 · 2 comments
Open

subscript text is converted to strikethrough text #99

zkamvar opened this issue Jun 19, 2023 · 2 comments
Labels
bug Something isn't working upstream This issue cannot be addressed directly in {tinkr}}

Comments

@zkamvar
Copy link
Member

zkamvar commented Jun 19, 2023

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 zkamvar added the bug Something isn't working label Jun 19, 2023
@zkamvar
Copy link
Member Author

zkamvar commented Jun 19, 2023

This was first observed in datacarpentry/R-ecology-lesson#859

zkamvar added a commit to datacarpentry/R-ecology-lesson that referenced this issue Jun 19, 2023
jamesmbaazam pushed a commit to datacarpentry/R-ecology-lesson that referenced this issue Jun 23, 2023
github-actions bot pushed a commit to datacarpentry/R-ecology-lesson that referenced this issue Jun 23, 2023
Auto-generated via {sandpaper}
Source  : cdb68f0
Branch  : main
Author  : Zhian N. Kamvar <[email protected]>
Time    : 2023-06-23 15:08:15 +0000
Message : fix strikethrough that should have been subscript

This was a bug from the transition. See ropensci/tinkr#99
github-actions bot pushed a commit to datacarpentry/R-ecology-lesson that referenced this issue Jun 23, 2023
Auto-generated via {sandpaper}
Source  : de78ebe
Branch  : md-outputs
Author  : GitHub Actions <[email protected]>
Time    : 2023-06-23 15:10:12 +0000
Message : markdown source builds

Auto-generated via {sandpaper}
Source  : cdb68f0
Branch  : main
Author  : Zhian N. Kamvar <[email protected]>
Time    : 2023-06-23 15:08:15 +0000
Message : fix strikethrough that should have been subscript

This was a bug from the transition. See ropensci/tinkr#99
@zkamvar zkamvar added the upstream This issue cannot be addressed directly in {tinkr}} label May 1, 2024
@zkamvar
Copy link
Member Author

zkamvar commented May 9, 2024

I've opened r-lib/commonmark#31 to fix this upstream, but the downside is that tildes will be escaped :/

@zkamvar zkamvar added the pending fix A fix has been proposed and is awaiting approval label May 9, 2024
@zkamvar zkamvar removed the pending fix A fix has been proposed and is awaiting approval label May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream This issue cannot be addressed directly in {tinkr}}
Projects
None yet
Development

No branches or pull requests

1 participant