r3 - 31 Oct 2005 - 13:49:34 - AntonAylwardYou are here: TWiki >  Codev Web > SyntaxForEndTags
Tags:
, create new tag
There's an increasing need for standardisation of syntax for "end tags". TWikiVariables? are frequently used as delimiters for blocks of content - e.g. STARTINCLUDE....STOPINCLUDE, SECTION...ENDSECTION but there is no standardisation for the syntax of end tags, making it impossible to write a general parser for these kinds of constructs.

Some alternatives:

  1. Bastardised XML tags c.f. <verbatim>...</verbatim>.
    • + consistent with <verbatim>
    • - not consistent with anything else
    • - confusion with HTML tags
    • - Personally I think this is really, really, really bad practice, and would like to deprecate <verbatim> in favour of %VERBATIM%
  2. %TAG%...%ENDTAG - Reserve the three characters END at the start of a tag name to refer to a tag that is paired with a matching tag without the END
    • + Consistent with SECTION...ENDSECTION
    • + Simple, intention-revealing
    • - Slight risk of conflict with real words e.g. ENDLESS, ENDEAVOUR, ENDIVE, ENDOMORPHIC
  3. %TAG%...%/TAG%
    • + consistent with XML syntax
    • - not very intention-revealing
    • - not in current use

My personal preference is to standardise on 2.

-- CrawfordCurrie - 31 Oct 2005

Do you like underscores? END_VERBATIM would avoid conflict with END.* words.

-- MartinCleaver - 31 Oct 2005

Having the END at the ... end would avoid that problem:

  • %VERBATIMEND%
  • %TAGEND%
  • %COLOREND%

just match on "%[A-Z][A-Z]*END%"

Somehow the END at the end seems approrate. I don't know if the pun maps to other languages.

-- AntonAylward - 31 Oct 2005

 


CategoryTWikiSyntax
Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r3 < r2 < r1 | More topic actions
 
Powered by TWiki
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback SourceForge.net Logo