Homec4science

Separate the remarkup rendering pipeline into multiple stages

Authored by epriestley <git@epriestley.com> on Jul 27 2011, 21:32.

Description

Separate the remarkup rendering pipeline into multiple stages

Summary:
See T367. It's desirable for some pieces of Remarkup syntax to be live (e.g.,
references to tasks) while others should be cached (e.g., syntax highlighting,
which is very slow).

This separates the Remarkup pipeline into a "pre-processing" stage, where rules
emit normal output, metadata, and a token map, and a "post-processing" stage
where rules may alter the metadata and token map before they are reunified.

This has the additional advnatage that we can now batch markup requests across
blocks, and, in the future, across texts.

This change has no impact on existing callers, it only provides additional
capabilities to the API.

Test Plan:

  • Rewrote the mentions rule to happen in post-processing; it works correctly.
  • Triggered a bunch of rules in the Phriction live preview.

Reviewed By: jungejason
Reviewers: hunterbridges, jungejason, tuomaspelkonen, aran
CC: aran, jungejason
Differential Revision: 737

Details

Committed
epriestley <git@epriestley.com>Aug 6 2011, 01:49
Pushed
aubortMar 17 2017, 12:03
Parents
rPHU061814088c6a: Add a rainbow syntax highlighter
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHU17133f64efea: Separate the remarkup rendering pipeline into multiple stages (authored by epriestley <git@epriestley.com>).Aug 6 2011, 01:49