Topic on Project:Support desk

Nesting tags from tag extension

2
Lord Farin (talkcontribs)

I have been trying to write an extension including some tags like 'section'. However, when trying to nest these, I cannot do anything but conclude that MW's tag detection does not support nested tags.

Suppose I use the following code:

<section name="name">This is a test
<section name="sub">What should be a subsection</section>
Some further text
</section>

The output generated then becomes of the following kind

start sample output

Section

This is a test

Section

What should be a subsection


Some further text

end sample output

I am using calls to recursiveTagParse to support this kind of tag nesting, but it appears (also when checking with the PHP function print_r the text that is sent to the parsing function) that the detection of tags is fundamentally flawed.

The current versions used are:

  • MW: 1.18.1
  • PHP: 5.3.10
  • MySQL: 5.5.20
Bawolff (talkcontribs)

Its not supported (see bugzilla:1310). If you need nesting, you have to use a parser function (if you have an existing parser tag, you can use #tag syntax as well).

Reply to "Nesting tags from tag extension"