1
Fork 0
Commit graph

10 commits

Author SHA1 Message Date
Dominik Nakamura
113362a944
Use custom header IDs if present ()
Co-authored-by: Jan-Erik Rediger <janerik@fnordig.de>
2023-08-01 12:59:27 +00:00
e2eb928184 Add the missing test files 2023-05-15 21:29:56 +02:00
c9484d562e Always convert CRLF into LF-only line endings.
CRLF lineendings will happen on Windows,
but they shouldn't matter for Markdown content.

pulldown-cmark will parse them _nearly_ the same.
`<!-- toc -->\r\n` will actually be 2 HTML elements:
the `<!-- toc -->` part and a `\n` part,
whereas `<!-- toc -->\n` will be just one: `<!-- toc -->\n`.
That throws off our marker parser because we're looking for the latter only.

So by stripping our the CR (`\r`) we don't need to special-case anything.
The rendering will be the same.

Closes 
2023-05-15 21:21:06 +02:00
35e0f51672 Handle empty documents.
Fixes 
2023-01-09 21:51:21 +01:00
9df9574187 Regression test for double inner backticks
Now that we don't parse & serialize that anymore,
we can't mess it up, but still good to ensure we never break it again.

Fixes 
2022-01-25 21:06:45 +01:00
adde0c8cfb Avoid roundtripping through pulldown-cmark
Roundtripping markdown is actually quite hard.
We don't actually require that.
All we need is once parsing the markdown to find the right marker and
the headings.
We then manually generate markdown and all other content can be copied
unparsed again.
2022-01-25 21:04:50 +01:00
e759070dc8 Add test case for backslash escapes 2021-08-02 18:18:49 +02:00
Smitty
980047b0cf Bump dependencies to fix HTML in tables
This updates dependencies, causing  to be fixed. This also adds a
regression test for .
2021-06-23 10:01:39 -04:00
1b3dceae42 Convert all tests into input/output files 2021-06-23 12:30:55 +02:00
a8a2e649df Move all tests to be integration tests only 2021-06-23 12:05:39 +02:00