Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Raw handling: skip inline shortcodes #6329
This PR implements #3806 (comment).
Only if the shortcode is preceded by a newline (or a plain paragraph tag from the Markdown converter), we should create a shortcode block. Otherwise we should like the shortcode alone as text.
I think this may be a bit too simplistic, but generally goes in the right direction. Maybe we should also check if the shortcode contains any HTML. If it does, maybe it should be "preserved" in a block.
How has this been tested?
See #3806 (comment).
Types of changes
Good question, though I'm not quite convinced. I guess this specific handling of inline shortcodes is mainly in place for backwards compatibility, but also as a way to cope with current limitations of the block paradigm:
And, conceptually, when transitioning to Gutenberg, I'd expect the latter scenario to convert to
Does this make sense, or was I just rambling?
changed the title from
Skip inline shortcodes
Raw handling: skip inline shortcodes
Apr 23, 2018
@aduth @mcsf We discussed this a few times, and I'm not sure what the right solution here is. Shortcakes and Markdown can conflict:
I'm sure we can fine-tune this in the future if we run into special cases. For now, this is a welcome fix for me.