Page MenuHomePhabricator

Allow extension tags to be terminated empty elements (<extension/> instead of <extension></extension>)
Closed, ResolvedPublic

Description

Author: avarab

Description:
There are extensions that only produce output but don't take any input, allowing
terminated empty elements for extensions would make the syntax more consistant.

<extension></extension>

Instead of

<extension/>

Note that arguments would also have to be supported, that is,

<extension foo="bar"/>

Instead of

<extension foo="bar"></extension>


Version: unspecified
Severity: enhancement

Details

Reference
bz2374

Revisions and Commits

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 8:34 PM
bzimport set Reference to bz2374.
bzimport added a subscriber: Unknown Object (MLST).

rowan.collins wrote:

(In reply to comment #0)

There are extensions that only produce output but don't take any input, allowing
terminated empty elements for extensions would make the syntax more consistant.

Just a comment about this being "more consistent" - this is based on the
interpretation of the extension markup as "being XML", rather than "happening to
look a bit like XML". If you think of the wiki markup as completely independent
of any other standard, having "<foo>bar</foo>" in no way implies having "<foo
/>" or even "<foo opt='bar'>". Not that I deny there's a certain elegance to XML
self-closing tags, I just think it's worth remembering that XML and wiki-markup
are two very different and basically unrelated beasts.

zigger wrote:

This change helps usability, as it would reduce the keystrokes needed to enter
an empty extension tag and would also reduce visual clutter (aka markup),
without being compulsory, so it seems wiki-good. It also reduces the need to
add more "magic words".

avarab wrote:

I applied a quick hack to support this in HEAD.

avarab wrote:

This was FIXED in CVS HEAD some time ago, there's a parsertest for it (along
with more extension stuff)

RESOLVED FIXED

epriestley added a commit: Unknown Object (Diffusion Commit).Mar 4 2015, 8:15 AM