carpentries / sandpaper

User Interface for The Carpentries Workbench
https://carpentries.github.io/sandpaper
Other
41 stars 24 forks source link

[bug] [0.16.0] callout block titles with markup have duplicated text #556

Closed zkamvar closed 9 months ago

zkamvar commented 9 months ago

The callout blocks with markup in their titles have duplicated text:

For example, the title ### callout (`callout`) appears like this:

callout with the title of callout (callout)callout)

The source of the error is from

https://github.com/carpentries/sandpaper/blob/50bfd5a04bcbaef5e24f06fd1c00ea50af4e5262/R/utils-xml.R#L198-L201

What we need to do is to select /text() before we pass the elements to xml_text_translate()