Hi,
I want to use the Table of Contents (TOC) macro in the sidebar. I want to exclude all headings that end in "headingABC" and all headings that end in "headingDEF".
Key Items of Note :
- Wiki markup for macros use the pipe key to separate parameter/value pairs.
- Regex uses the pipe key as the OR operator within an expression.
Issue :
When I add an OR operator (pipe key) to the exclude parameter value it is effectively being interpreted as the end of the exclude parameter value rather than being interpreted as the OR operator within the expression value of the exclude parameter.
STRs
1. Create a page, add text for "headingABC" and "headingDEF" then set both to H1 (level is irrelevant). Click update to save the page.
2. Navigate to the space sidebar textarea (space tools > look and feel > sidebar, header, and footer) and copy/past the TOC markup {toc:exclude=.*headingABC|.*headingDEF} in the textarea and click save to save the sidebar.
3. Load the page created in step 1 and view the content rendered by the TOC macro.
//end STRs
Actual Result : Only the first heading added in the exclude is actually excluded.
Expected Result : All the headings specified in the exclude parameter should be excluded.
I have tried some variations including escaping the pipe {toc:exclude=.*headingABC\|.*headingDEF}, double escapes, double pipes, double rainbows, quotes in various places, and more but haven't yet gotten multiple expressions using the OR operator to exclude multiple headings in the sidebar. Works as expected when the TOC is in the page rather than the sidebar, however.
What's the markup that would accomplish this?
Thanks,
Nicole