We've removed nearly all special tag properties, starting with multiarg (the ability to specify named attributes, now universal), going on to nocode (preventing descendants from rendering, now specified by the template's use of tag.source rather than tag.content), plain (escaping HTML inside, now specified by the template), and dynamic (evaluating as PHP, now replaced by Twig templates).
The last remaining property is selfclosing. It tells the parser that this tag should be closed immediately when encountered.
Here are the problems with that:
- a) It's got a tiny use-case - basically [hr], which isn't even a packaged default. Even the self-closing [img=SRC] has been replaced by the more popular [img]SRC[/img] syntax used everywhere else.
- b) It's badly documented in the filter tips. You need to look at the sample to see whether it's self-closing or not, which isn't even shown in the short tips.
- c) It makes parsing depend on the plugin used - toggle the property, and a text generates a different tree.
We could just ditch it, and require all tags to be closed properly.
We can even accept a "short" syntax a la XML - [tag/] is synonymous with [tag][/tag].
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | bigpatch.patch | 9.4 KB | cburschka |
Comments
Comment #2
cburschka(Squashing a few unpushed code-style patches into this one, because I want to run them by the testbot without making an extra issue.)
Comment #3
cburschkaAnd done.