seonbi-0.5.0: SmartyPants for Korean language
Safe HaskellSafe-Inferred
LanguageHaskell2010

Text.Seonbi.PairedTransformer

Synopsis

Documentation

data PairedTransformer match Source #

Settings for transformPairs.

Constructors

PairedTransformer 

Fields

transformPairs :: forall m. PairedTransformer m -> [HtmlEntity] -> [HtmlEntity] Source #

Some transformations should be done only if a start and an end are paired like parentheses. These even usually can be nested. Even if there is a start and an end they should not be paired unless they are sibling in an HTML tree.

These kinds of scanning are easily turned highly stateful and imperative, hence hard to debug. This base class provides the common logic between these kinds of paired transformations so that an implementation class fill several abstract methods triggered by the state machine.