You are here: Foswiki>Tasks Web>Item11353 (05 Jul 2015, GeorgeClark)Edit Attach

Item11353: HTML commented out heading shows in TOC.

pencil
Priority: Low
Current State: Closed
Released In: 2.0.0
Target Release: major
Applies To: Engine
Component: FoswikiMacrosTOC
Branches: master
Reported By: JozefMojzis
Waiting For:
Last Change By: GeorgeClark

HTML commented out heading shows in %TOC%

Problem demonstration

When in the text is commented out a block of text like this (followed text is HTML-commented out):

the commented heading in the TOC still shown, but (ofc) not in the rendered page. The way what I found is mark the text inside the comments as verbatim.
<-- <verbatim>
---++ heading
text
</verbatim> -->

Not very nice solution...

Imo, here should be some MACRO comment syntax, like what we have in the templates.
%{ comment %}

Anything enclosed inside %{ content }% should be completly ignored in the rendering...
s/%\{.*?\}%//gm;

-- JozefMojzis - 13 Dec 2011

 

ItemTemplate edit

Summary HTML commented out heading shows in TOC.
ReportedBy JozefMojzis
Codebase 1.1.9, 1.1.4 RC1, trunk
SVN Range
AppliesTo Engine
Component FoswikiMacrosTOC
Priority Low
CurrentState Closed
WaitingFor
Checkins distro:d788c303f4ba distro:28dc5dc3def0
TargetRelease major
ReleasedIn 2.0.0
CheckinsOnBranches master
trunkCheckins
masterCheckins distro:d788c303f4ba distro:28dc5dc3def0
ItemBranchCheckins
Release01x01Checkins
Topic revision: r5 - 05 Jul 2015, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy