Item11788: Consecutive verbatim blocks are merged.
Priority: Enhancement
Current State: Confirmed
Released In: n/a
Target Release: n/a
block 1
block 2
Will be merged into a single verbatim block
block 1
block 2
--
GeorgeClark - 25 Apr 2012
Hm. This appears to be "by design". There is code in Node.pm that merges consecutive tags.
# Collapse adjacent tags
foreach my $tag (qw(noautolink verbatim literal)) {
...
--
GeorgeClark - 25 Apr 2012
CrawfordCurrie recalled that some versions of TMCE tended to output a separate pre block for each line in a verbatim/pre block. The merge was required to end up with sane TML. However a couple of things have changed.
- I don't believe that this pre-per-line behavior still is happening
-
verbatim class="..."
is now in prevalent use for chili formatting,etc. The merge code simply looks at an adjacent close and open tag, which can collapse tags of different classes.
--
GeorgeClark - 25 Apr 2012
This is partially fixed.
- adjacent blocks are not merged if the
class=
attributes are different
-
foswiki*
classes are now preserved.
If blocks with identical attributes are adjacent and only separated by whitespace, they will eventually be merged after one or more edit/save cycles. This is partly an architectural issue.
TML2HTML generates:
<p><pre>...</pre></p>
however TMCE discards the surrounding paragraph tag, as it is not legal XHTML.
--
GeorgeClark - 27 Apr 2012
Paste into a verbatim is what triggers the block-per-link behavior. Maybe better to not fix this one.
--
GeorgeClark - 05 May 2012