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
When parsing an Obsidian-flavoured Markdown document containing an embedded document, like ![[Foo]], the produced AST omits the exclamation mark. Consequently, when regenerating the Markdown document from the AST, the exclamation mark is lost.
An additional problem is that the square brackets are escaped during the AST roundtrip, which does not happen when one of the new wikilinks_title extensions is enabled. With the exclamation mark in front, however, the double square brackets are no longer detected as links (besides losing the exclamation mark).
I'm aware of the existing issue #553 discussing transclusion support. However, my concern here is not about adding transclusion support but ensuring that no information gets lost during the AST generation and regeneration process.
Steps to Reproduce
Create a Markdown document example.md with the following content:
![[Foo]]
Parse the document to produce an AST using Pandoc: pandoc -f markdown+wikilinks_title_after_pipe -t json example.md > example.json
This produces:
When parsing an Obsidian-flavoured Markdown document containing an embedded document, like
![[Foo]]
, the produced AST omits the exclamation mark. Consequently, when regenerating the Markdown document from the AST, the exclamation mark is lost.An additional problem is that the square brackets are escaped during the AST roundtrip, which does not happen when one of the new
wikilinks_title
extensions is enabled. With the exclamation mark in front, however, the double square brackets are no longer detected as links (besides losing the exclamation mark).I'm aware of the existing issue #553 discussing transclusion support. However, my concern here is not about adding transclusion support but ensuring that no information gets lost during the AST generation and regeneration process.
Steps to Reproduce
Create a Markdown document
example.md
with the following content:Parse the document to produce an AST using Pandoc:
pandoc -f markdown+wikilinks_title_after_pipe -t json example.md > example.json
This produces:
Regenerate the Markdown document from the AST:
pandoc -t markdown+wikilinks_title_after_pipe example.json
Expected Behavior
The regenerated Markdown document should retain the original embedded document syntax, including the exclamation mark:
Actual Behavior
The exclamation mark is missing in the regenerated Markdown document and the brackets are escaped:
Additional Information
Pandoc version
on MacOS 13.5.
The text was updated successfully, but these errors were encountered: