diff options
| author | Evan Silberman <[email protected]> | 2024-12-04 12:18:13 -0800 |
|---|---|---|
| committer | John MacFarlane <[email protected]> | 2024-12-05 22:57:18 -0800 |
| commit | 126e3330b9805f1ed632939821998afadcd10744 (patch) | |
| tree | 3f4118eb0576c517618a86319143a90afff41375 /pandoc.cabal | |
| parent | f87116a0b415aba7c6b2323ecb5dcac037ceb8d1 (diff) | |
Parameterize Roff escaping
The existing lexRoff does some stuff I don't want to deal with in mdoc
just yet, like lexing tbl, and some stuff I won't do at all, like
handling macro and text string definitions and switching between modes.
Uses a typeclass with associated type families to reuse most of the
escaping code between Roff (i.e. man) and Mdoc.
Future work could improve on this so that more lexing code could be
shared between Man and Mdoc. Mdoc inherits Roff's surface syntax so
hypothetically it makes sense to lex it into tokens that make sense for
roff. But it happens that the Mdoc parser is much easier to build with
an Mdoc specific token stream. Some discussion in jgm/pandoc#10225 about
the rationale.
Adds a test for the roff \A escape, which I accidentally dropped support
for in an earlier iteration without anything complaining.
Diffstat (limited to 'pandoc.cabal')
| -rw-r--r-- | pandoc.cabal | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/pandoc.cabal b/pandoc.cabal index 32ebcd43a..2896d1ee5 100644 --- a/pandoc.cabal +++ b/pandoc.cabal @@ -731,6 +731,7 @@ library Text.Pandoc.Readers.Org.Shared, Text.Pandoc.Readers.Metadata, Text.Pandoc.Readers.Roff, + Text.Pandoc.Readers.Roff.Escape, Text.Pandoc.Writers.Docx.OpenXML, Text.Pandoc.Writers.Docx.StyleMap, Text.Pandoc.Writers.Docx.Table, |
