summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Parsing
AgeCommit message (Collapse)Author
2023-11-15Markdown reader: don't change newlines to spaces in math.John MacFarlane
Preserve them: otherwise we can get unwanted results if there's a `%` comment. Closes #9193.
2023-04-17Remove unnecessary 'spaces' in parseFromString.John MacFarlane
2023-01-10Update copyright years, it's 2023!Albert Krewinkel
2022-10-31First stab at mtl 2.3 compliance.John MacFarlane
This will no doubt produce a bunch of warnings and hence CI failures, which we'll need to work around with explicit imports.
2022-10-30hlint suggestions.John MacFarlane
2022-10-29Re-export lookupEntity from Text.Pandoc.XML [API change].John MacFarlane
2022-10-29T.P.Parsing.General: change `characterReference`, `charsInBalanced`.John MacFarlane
`characterReference` now returns a Text (as it should, because some named references don't correspond to a single Char), and uses the `lookupEntity` function from commonmark-hs instead of the slow one from tagsoup. `charsInBalanced` now takes a Text parser rather than a Char parser as argument. [API change]
2022-10-20Text.Pandoc.Parsing: remove `nested` [API change].John MacFarlane
It was not being used, and in fact it was a bad idea from the beginning, as it had no hope of solving the problem it was introduced to solve.
2022-10-19T.P.Shared: remove `mapLeft` [API change].John MacFarlane
This is just a synonym for Bifunctor.first.
2022-10-18T.P.Shared: remove `escapeURI`, `isURI`.John MacFarlane
These are now exported by Text.Pandoc.URI, and removing them from Shared helps make module structure more straightforward.
2022-10-18Revert "T.P.Parsing: export `registerIdentifier`."John MacFarlane
This reverts commit 20492d523c8324e36781cfbbc8092c796f94b151.
2022-10-18T.P.Parsing: export `registerIdentifier`.John MacFarlane
[API change] Use this in the HTML reader to register identifiers to avoid duplicates created by `auto_identifiers`.
2022-10-17T.P.Error: Remove PandocParsecError constructor from PandocError. (#8385)John MacFarlane
Henceforth we just use `PandocParseError`. T.P.Parsing now exports `fromParsecError`, which can be used to turn a parsec ParseError into a regular PandocParseError (the appearance to the user should be unchanged in every case). [API change] Closes #8382.
2022-10-16T.P.Parsing: Remove gratuitious renaming of Parsec types.John MacFarlane
We were exporting Parser, ParserT as synonyms of Parsec, ParsecT. There is no good reason for this and it can cause confusion. Also, when possible, we replace imports of Text.Parsec with T.P.Parsing. The idea is to make it easier, at some point, to switch to megaparsec or another parsing engine if we want to. T.P.Parsing new exports: Stream(..), updatePosString, SourceName, Parsec, ParsecT [API change]. Removed exports: Parser, ParserT [API change].
2022-10-15Minor code cleanups.John MacFarlane
2022-10-03Rename T.P.Readers.LaTeX.Types -> T.P.TeX.John MacFarlane
2022-10-03Rename T.P.Network.HTTP -> T.P.URI.John MacFarlane
This is still an unexported internal module. Export `urlEncode`, `escapeURI`, `isURI`, `schemes`, `uriPathToPath`. Re-export `escapeURI` and `isURI` from T.P.Shared (as they were exported before); drop exports of `schemes` and `uriPathToPath` [API change]. With this change, T.P.Class no longer depends on T.P.Shared.
2022-09-27Fix small whitespace things.John MacFarlane
2022-09-01Use dev version of gridtablesAlbert Krewinkel
This allows to specify a table foot by enclosing it with part separator lines, i.e., row separator lines consisting only of `+` and `=` characters. E.g.: +------+-------+ | Item | Price | +======+=======+ | Eggs | 5£ | +------+-------+ | Spam | 3£ | +======+=======+ | Sum | 8£ | +======+=======+ The last row, containing "Sum" and "8£", is the table foot. Closes: #8257
2022-07-30Support rowspans and colspans in grid tables (#8202)Albert Krewinkel
* Add tests for zero-width and fullwidth chars in grid tables * T.P.Parsing: simplify `gridTableWith'`, `gridTableWith` [API Change] The functions `gridTableWith` and `gridTableWith'` no longer takes a boolean argument that toggles whether a table head should be parsed: both, tables with heads and without heads, are always accepted now. * Support colspans, rowspans, and multirow headers in grid tables. Grid tables in Markdown, reStructuredText, and Org can now contain cells spanning over multiple columns and/or multiple rows; table headers containing multiple rows are supported as well. Note: the markdown writer does not yet support these more complex grid table features.
2022-07-18Parsing.GridTable: remove use of unsafe function `last`Albert Krewinkel
2022-06-19Future compat against liftA2 export from Prelude (#8132)Georgi Lyubenov
2022-03-31Revert "Parsing.General: make manyChar1, etc. more strict."John MacFarlane
This reverts commit c1ab48874c04142988505ca5c5caa6626bb68211. Mistake in measurement.
2022-03-31Parsing.General: make manyChar1, etc. more strict.John MacFarlane
Profiling the muse reader revealed that these were creating huge thunks.
2022-03-25Rename T.P.Parsing.Combinators -> T.P.Parsing.General.John MacFarlane
Because many of the exported things aren't combinators... Also remove redundant explot of indentWith from T.P.Parsing.Lists.
2022-03-24[API change] Unify grid table parsing (#7971)Albert Krewinkel
Grid table parsing in Markdown and rst are updated use the same functions. Functions are generalized to meet requirements for both formats. This change also lays the ground for further generalizations in table parsers, including support for advanced table features. API changes in Text.Pandoc.Parsing: - Parse results of functions `tableWith'` and `gridTableWith'` are now a `mf TableComponents` instead of a quadruple of alignments, column widths, header rows and body rows. Additional exports from Text.Pandoc.Parsing: - `tableWith'` - `TableComponents` - `TableNormalization` - `toTableComponents` - `toTableComponents'`
2022-03-18Parsing.GridTable: simplify column handling code.Albert Krewinkel
2022-03-12Document more functions in T.P.Parsing and T.P.Shared.Albert Krewinkel
2022-03-11Parsing: partition module into (internal) submodules (#7962)Albert Krewinkel