r-lib / commonmark

High Performance CommonMark and Github Markdown Rendering in R
https://docs.ropensci.org/commonmark/
Other
88 stars 11 forks source link

Tests failing in roxygen2 #11

Closed jennybc closed 5 years ago

jennybc commented 5 years ago

I first saw this locally then checked that same is happening on CRAN. Something about the most recent common mark release seems to have changed behaviour that is tested in roxygen2.

https://cran.r-project.org/web/checks/check_results_roxygen2.html

jennybc commented 5 years ago

A bit more info from a test case. commonmark::markdown_xml("foo [func()] bar") is returning:

<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n
<!DOCTYPE document SYSTEM \"CommonMark.dtd\">\n
<document
    xmlns=\"http://commonmark.org/xml/1.0\">\n  
    <paragraph>\n    
        <text xml:space=\"preserve\">foo </text>\n    
        <link destination=\"R:func()\" title=\"\">\n      
            <text xml:space=\"preserve\">func()</text>\n    
        </link>\n    
        <text xml:space=\"preserve\"> bar</text>\n  
    </paragraph>\n
</document>\n

whereas the expectation (previous behaviour?) is:

<link destination=\"R:func\\(\\)\" title=\"\">\\s*
    <text>func\\(\\)</text>

Not sure who needs to adjust to whom here.

jennybc commented 5 years ago

cc @gaborcsardi

jeroen commented 5 years ago

Fixed via https://github.com/klutometis/roxygen/pull/811