Rewrite the shortcode parser to support nested shortcodes and self-nested shortcodes

The current shortcode parser is based on a single regular expression, making it error-prone and incapable of many useful features, such as nesting two instances of the same shortcode.

Here is a proof of concept parser for shortcodes that supports nesting and self-nesting out of the box: GitHub - gschoppe/Better-Shortcode-Parser: WordPress Shortcode Parser, based on the Gutenberg Block Parser


Read-only archive: Issues · ClassicPress/ClassicPress · GitHub

Author: Greg Schoppe

Vote count: 11

Status: open


Comments

@timkaye you supported the original petition. Do you still think we need a better shortcode parser?

While I still think it’s a good idea, I haven’t seen anyone complain about running into any problems on CP with the current shortcode implementation. So I think this can safely be closed.

If the problem is reported at some time in the future, we could potentially revisit this then.

2 Likes

This topic was automatically closed after 3 days. New replies are no longer allowed.