Closed
Description
I'm not sure if this is a bug in commonmark
or xml2
I will report it here because I think that the issue is with the original encoding here. This happened when trying to use usethis::use_spell_check()
on the janitor
package.
When converting the attached NEWS.md file, I think that commonmark
doesn't correctly parse and escape values. (The issue may be that xml2
doesn't correctly handle these values, though.)
text <- readLines("https://github.com/user-attachments/files/18189322/NEWS.md")
md <- commonmark::markdown_xml(text, sourcepos = TRUE)
doc <- xml2::xml_ns_strip(xml2::read_xml(md))
#> Error in read_xml.raw(charToRaw(enc2utf8(x)), "UTF-8", ..., as_html = as_html, : PCDATA invalid Char value 19 [9]
Created on 2024-12-18 with reprex v2.1.1
Metadata
Metadata
Assignees
Labels
No labels