Nested Comments

Posted by ErichSteinboeck on 21 Mar 2009 11:48, last edited by GoVegan on 09 May 2010 05:55

: code comment nested

rating: +4

When editing Wikidot pages it is sometimes convenient to remove parts of a page by commenting it (i. e. surrounding it with Wikidot comment tags [!-- and --]) instead of deleting it.

Commenting a part of a page with Wikidot comments only works as long as the part to be commented does not itself contain comments. Wikidot comments do not support nested comments — the first end comment tag (--]) that's inside the part to be commented would prematurely end the surrounding comment.

Here is a way how to comment a part of page with almost any content.

How it Works

Instead of using simple Wikidot comment tags ([!-- and --]) use

as a comment start

[!--
[[code]]

and as a comment end

[[/code]]
--]

Examples

What you type … What you get …
Code before commented section
[!--
[[code]]
A section of ``code'' containing @@tags@@,
//formatting// and a [!-- nested --] comment
[[/code]]
--]
Code after commented section
Code before commented section
Code after commented section

Backlinks

Author

ErichSteinboeck ErichSteinboeck . Please visit his/her userPage.


Related articles

Comments

Footnotes
. The only exceptions are
  • an unbalanced [[code]] tag without its closing [[/code]] tag, or
  • an unbalanced [[/code]] tag without its opening [[code]] tag
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Share Alike 2.5 License.
Click here to edit contents of this page.
Click here to toggle editing of individual sections of the page (if possible). Watch headings for an "edit" link when available.
Append content without editing the whole page source.
Check out how this page has evolved in the past.
If you want to discuss contents of this page - this is the easiest way to do it.
View and manage file attachments for this page.
A few useful tools to manage this Site.
Change the name (also URL address, possibly the category) of the page.
View wiki source for this page without editing.
View/set parent page (used for creating breadcrumbs and structured layout).
Notify administrators if there is objectionable content in this page.
Something does not work as expected? Find out what you can do.
General Wikidot.com documentation and help section.
Wikidot.com Terms of Service - what you can, what you should not etc.
Wikidot.com Privacy Policy.

AltStyle によって変換されたページ (->オリジナル) /