Fix Shortcode—Markdown conflicts #5695
Labels
[Feature] Raw Handling
Related to the ability to convert content to blocks, paste handling, etc
[Feature] Writing Flow
Block selection, navigation, splitting, merging, deletion...
Spawned from discussion in #4944.
Issue Overview
By their respective syntax, Markdown and WordPress shortcodes are prone to conflict with one another. This is particularly visible in the examples below.
Links
When pasting the following:
the ideal reconciliation would be as follows:
[awesomer]
is the identifier for a reference-style link[better]
is the wrapped text for said link[better][awesomer]
to a link (tohttps://example.org
)[awesome]
is a standalone tag with no link attached to itEscaping shortcode contents
When pasting the following:
the ideal reconciliation would be as follows:
[my_shortcode]
is recognized as a shortcode with opening and closing tags and containing the stringhello, _there_.
[another_shortcode]
is recognized as being a shortcode and not a link, but it is assumed self-closing**oh**,
andhello, _there_.
will be rendered as<strong>oh</strong>,
andhello, <em>there</em>.
, respectively.Possible Solution
This comment of mine #4944 (comment) points to a Gist offering a working solution to get started.
Screenshots / Video
Related Issues and/or PRs
Todos
The text was updated successfully, but these errors were encountered: