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
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:
This contains an [awesome] link to something. This here is even [better][awesomer].
[awesomer]: http://example.org
the ideal reconciliation would be as follows:
[awesomer] is the identifier for a reference-style link
[better] is the wrapped text for said link
thus, let Markdown handle and convert the pair [better][awesomer] to a link (to https://example.org)
[awesome] is a standalone tag with no link attached to it
thus, let Gutenberg treat it as a shortcode — which for standalone shortcodes means converting to a shortcode block, and for inline shortcodes means leaving it untouched
[my_shortcode] is recognized as a shortcode with opening and closing tags and containing the string hello, _there_.
thus, don't perform any Markdown conversion on the tag itself and on its contents
[another_shortcode] is recognized as being a shortcode and not a link, but it is assumed self-closing
thus, no escaping is due, and the fragments **oh**, and hello, _there_. will be rendered as <strong>oh</strong>, and hello, <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
Tests
Documentation
The text was updated successfully, but these errors were encountered:
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: