Tags:
create new tag
view all tags

SID-02137: % TOC % Variable using !!

Status: Answered Answered TWiki version: Perl version:
Category: WysiwygPlugin Server OS: Last update: 10 years ago

Every time I use !! to block part of a sentence from being included in the table of contents it ends up moving to the front of my sentence thus deleting my whole topic from the TOC.

Ex: Starts looking like this:
---+++++ C. TYPES OF Topics !! - Alabama is a Mortgage state.

After saving and reediting it. I open to it looking like this:
---+++++!! C. TYPES OF Topics – Alabama is a Mortgage state.

Is there a way I can prevent this from happening.

-- Jonathan Mayran - 2015-12-21

Discussion and Answer

Whoa - I wasn't even aware that !! could be used to suppress part of a heading to appear in the table of contents. It isn't written in the TextFormattingRules, nor in the test suite. I just found it in the Description for TOC, though, so apparently it is a documented feature.

And probably that's also the root cause: The developers didn't have that feature in mind when they implemented the necessary conversions between WYSIWYG- and "traditional" markup editing.

As a workaround you can "Raw edit" such topics, this keeps the headers intact.

For a fix, you can file a bug report: Round trips without changing anything in a heading must not change its rendering. With regard to the editing interface, this needs the eyes of people familar with the WYSIWYG editor: So far I haven't spotted a possibility to remove the "hide in TOC" state from a heading, or to even see that a heading wouldn't appear in the TOC.

-- Harald Jörg - 2015-12-22

As another workaround, I'll attach a simple patch (https://twiki.org/p/pub/Support/SID-02137/SID-02137.diff): This avoids moving !! to the front of the line, at the expense of keeping it visible while editing the page in WYSIWYG mode.

-- Harald Jörg - 2015-12-22

Thank you Harald for the patch! Having the !! visible in WYSIWYG edit mode is actually good I think.

-- Peter Thoeny - 2015-12-23

Can you please tell me how to implement this patch that you have posted. I apologized I am a twiki novice.

-- Jonathan Mayran - 2015-12-23

See HowToApplyPatch

-- Peter Thoeny - 2015-12-24

      Change status to:
ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
SupportForm
Status Answered
Title % TOC % Variable using !!
SupportCategory WysiwygPlugin
TWiki version

Server OS

Web server

Perl version

Browser & version

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatdiff SID-02137.diff r1 manage 0.6 K 2015-12-22 - 22:20 HaraldJoerg Avoid treating "!!" as special while editing
Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 2015-12-24 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.