HaXtatic Docs

hax.unMarkup

Outputs the given content with HTML/XML/etc. markup tags (but not entities outside such tags) naively replaced by space characters.

In a nutshell

  1. Declaration of an |X|hax.unMarkup:myTag directive in a *.haxproj file,
    • further configuring: (no other settings)
  2. Usage anywhere: {X|myTag: any content to plain-text-ify |}

This topic is in a compact format for users already familiar with the essentials of declaring X-tags and invoking them. If found challenging, try the more-elaborate-and-introductory topics first to form a better grasp on the basics and overall mechanisms.

Stage:

Early — this X-renderer does not require a page context for rendering: therefore many hax.unMarkup-invoking X-tags encountered during pre-templating (at start-up time) may be eagerly processed immediately in-place (for overall-reduced per-page processing loads).

Purpose

Plain-text-ify markup input for use in still ultimately markup target formats: this allows ignoring ie. keeping entities (outside tags) and replacing all tag characters (everything inside and including  < and  >) simply and naively (but, speedily!) with a sequence of space characters (since the final effective display mechanism will, once again, collapse them all into one).

  
…Scroll to: