You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This turned out to be a serious problem for my link annotation code because I write it as HTML, and so naturally my processing code also used readHTML; unfortunately, that erases most (but not all) of the data (which fooled me for a while because I could see the classes/IDs were all still there when I checked the final generated HTML, but didn't notice the data-* attributes were all gone). Debugging in ghci & CLI were even more confusing until I happened to check every possible pair of HTML/Markdown input/output formats and discovered that readMarkdown is better at reading HTML than readHtml is (!). This solved the immediate problem of silently stripping annotations but introduced further downstream problems like needing to strip <p></p> surrounding fragments like titles/authors... So it would be good for this to be fixed.
The text was updated successfully, but these errors were encountered:
Pandoc correctly generates a HTML link with ID & attributes:
On reading its own HTML as HTML and generating either HTML or Markdown, the key-value attributes are silently erased:
But on reading its own HTML as Markdown, the data is preserved correctly:
This turned out to be a serious problem for my link annotation code because I write it as HTML, and so naturally my processing code also used
readHTML
; unfortunately, that erases most (but not all) of the data (which fooled me for a while because I could see the classes/IDs were all still there when I checked the final generated HTML, but didn't notice the data-* attributes were all gone). Debugging in ghci & CLI were even more confusing until I happened to check every possible pair of HTML/Markdown input/output formats and discovered thatreadMarkdown
is better at reading HTML thanreadHtml
is (!). This solved the immediate problem of silently stripping annotations but introduced further downstream problems like needing to strip<p></p>
surrounding fragments like titles/authors... So it would be good for this to be fixed.The text was updated successfully, but these errors were encountered: