internal package Foswiki::Plugins::WysiwygPlugin::HTML2TML::WC

See PublishedAPI for packages intended to be used by Plugin and Contrib authors, or browse all packages.
See also Developing plugins, Developer's Bible, Technical Overview

internal package WC

Constants

Generator flags

$NO_TML Flag that gets passed down into generator functions. Constrains output to HTML only.
$NO_BLOCK_TML Flag that gets passed down into generator functions. Don't generate block TML e.g. tables, lists
$NOP_ALL Flag that gets passed down into generator functions. NOP all variables and WikiWords.
$BLOCK_TML Flag passed up from generator functions; set if expansion includes block TML
$VERY_CLEAN Flag passed to indicate that HTML must be aggressively cleaned (unrecognised or unuseful tags stripped out)
$BR2NL Flag set to force BR tags to be converted to newlines.
$KEEP_WS Set to force the generator to keep all whitespace. Otherwise whitespace gets collapsed (as it is when HTML is rendered)
$PROTECTED In a block marked as PROTECTED
$KEEP_ENTITIES Don't decode HTML entities

Forced whitespace

These single-character shortcuts are used to assert the presence of non-breaking whitespace.

$NBSP Non-breaking space
$NBBR Non-breaking linebreak

Inline Assertions

The generator works by expanding to "decorated" text, where the decorators are characters below ' '. These characters act to express format requirements - for example, the need to have a newline before some text, or the need for a space. The generator sticks this format requirements into the text stream, and they are then optimised down to the minimum in a post- process.

$CHECKn there must be an adjacent newline (\n or $NBBR)
$CHECKs there must be an adjacent space (' ' or $NBSP)
$CHECKw There must be adjacent whitespace (\s or $NBBR or $NBSP)
$CHECK1 Marks the start of an inline wikiword.
$CHECK2 Marks the end of an inline wikiword.
$TAB Shorthand for an indent level in a list

REs

REs for matching delimiters of wikiwords, must be consistent with TML2HTML.pm

$STARTWW Zero-width match for the start of a wikiword
$ENDWW Zero-width match for the end of a wikiword
$PROTOCOL match for a valid URL protocol e.g. http, mailto etc

Topic revision: r1 - 19 Apr 2011, ProjectContributor
 
This site is powered by FoswikiCopyright © CC-BY-SA by the contributing authors. All material on this collaboration platform is copyrighted under CC-BY-SA by the contributing authors unless otherwise noted.
Ideas, requests, problems regarding Foswiki? Send feedback