aboutsummaryrefslogtreecommitdiffstats
path: root/src/util/mod.rs (unfollow)
Commit message (Collapse)AuthorFilesLines
2022-09-26Add support for compiling to mdastLibravatar Titus Wormer1-0/+1
See: <https://github.com/syntax-tree/mdast>.
2022-09-19Add support for parsing MDX ESM, expressionsLibravatar Titus Wormer1-0/+1
This commit adds support for hooks that lets a user integrate another parser with `micromark-rs`, to parse ESM and expressions according to a particular grammar (such as a programming language, typically JavaScript). For an example integrating with SWC, see `tests/test_utils/mod.rs`. The integration occurs with two functions passed in `options`: `mdx_expression_parse` and `mdx_esm_parse`. The can signal back to micromark when they are successful, whether there is an error at the end (in which case micromark will try to parse more), or whether there is a syntax error (in which case micromark will crash).
2022-09-09Refactor to move byte, char info to own fileLibravatar Titus Wormer1-1/+1
2022-09-01Add support for GFM tagfilterLibravatar Titus Wormer1-0/+1
2022-08-19Refactor to move more things to `util/`Libravatar Titus Wormer1-0/+2
2022-08-18Add support for GFM autolink literalsLibravatar Titus Wormer1-0/+1
2022-08-15Refactor to proof docs, grammarsLibravatar Titus Wormer1-1/+1
2022-07-28Refactor to work on `char`sLibravatar Titus Wormer1-2/+1
Previously, a custom char implementation was used. This was easier to work with, as sometimes “virtual” characters are injected, or characters are ignored. This replaces that with working on actual `char`s. In the hope of in the future working on `u8`s, even. This simplifies the state machine somewhat, as only `\n` is fed, regardless of whether it was a CRLF, CR, or LF. It also feeds `' '` instead of virtual spaces. The BOM, if present, is now available as a `ByteOrderMark` event.
2022-07-07Add basic support for block quotesLibravatar Titus Wormer1-0/+1
2022-07-05Refactor code styleLibravatar Titus Wormer1-0/+1
2022-06-28Fix jumps in `edit_map`Libravatar Titus Wormer1-0/+1
* Use resolve more often (e.g., heading (atx, setext)) * Fix to link whole phrasing (e.g., one big chunk of text in heading (atx, setext), titles, labels) * Replace `ChunkText`, `ChunkString`, with `event.content_type: Option<ContentType>` * Refactor to externalize `edit_map` from `label`
2022-06-22Add support for normalizing identifiersLibravatar Titus Wormer1-0/+1
2022-06-21Add docs for `subtokenize`Libravatar Titus Wormer1-1/+0
2022-06-20Add support for line endings in stringLibravatar Titus Wormer1-0/+1
2022-06-14Reorganize to split utilLibravatar Titus Wormer1-0/+6