Analysis by Andy

  1. Constants and variables are setup
  2. Source transformations as defined in $ewiki_config["wm_source"] are applied.
  3. foreach block plugin as defined in $ewiki_config["format_params"] + $params
    1. foreach block with block plugins enabled. NB: there is only one block at first
    2. while start and end tags for this plugin are present
      1. replace the current block with three
        • source prior to the begin tag
        • source within the block's tags
        • source after the end tag
      2. advance to point at the second of the above blocks
  4. foreach block, run the selected plugin(s) for that block type
  5. foreach block:
    1. if it is flagged for wiki markup
      • Wiki processing is line-by-line
      • any non-core plugin is processed in block mode
      • builds paragraphs in $s["para"]==&$para ewiki_format_close_paragraph() inteligently closes these and ewiki_format_close_tags() does the same for other tags
      • headlines are handled by counting "!" and calculating <h> from that
      • list markup is a separate subject, for another time.
      • wm_style markup and wm_start_end markup are applied as a foreach, each markup may be used up to 20 times in a line
      • ["format_line"] plugins are applied after all other markup
    2. if it is not flagged for wiki markup copy it to the output buffer
  6. links are then applied to blocks flaged with 0x002.
  7. a single return string is merged together
  8. format_final plugins are called on this string
  9. render complete

very complete analysis! - should I have forgotten to supply one? ;) -- milky

Yes.


Design Notes

  • block plugins <pre>, <html>, <code>, <php>, <wiki>, ...
  • separation of output stream into chunks
    • flags which tell about, if wikilinks should be rendered, html must be escaped
  • list support reworked, to finally output proper nested and valid <html>

2004-01-01: It's almost done, and there is already some helpful developer documentation in the README. I recommend testing it now, so we can fix it for complete compatibility with the earlier engine. milky

"support for paragraph-wide markup (instead of current line-wise)" has been abondoned, but lists now can be coninued on a second line.

The new ewiki_format() therefore allows to drop:

  • markup_paragraphs
  • the markup_code workaround plugin
bottom corner