1
Fork 0
Commit graph

9 commits

Author SHA1 Message Date
Jan-Erik Rediger e2eb928184 Add the missing test files 2023-05-15 21:29:56 +02:00
Jan-Erik Rediger 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 #35
2023-05-15 21:21:06 +02:00
Jan-Erik Rediger 35e0f51672 Handle empty documents.
Fixes #31
2023-01-09 21:51:21 +01:00
Jan-Erik Rediger 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 #23
2022-01-25 21:06:45 +01:00
Jan-Erik Rediger 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
Jan-Erik Rediger 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 #19 to be fixed. This also adds a
regression test for #19.
2021-06-23 10:01:39 -04:00
Jan-Erik Rediger 1b3dceae42 Convert all tests into input/output files 2021-06-23 12:30:55 +02:00
Jan-Erik Rediger a8a2e649df Move all tests to be integration tests only 2021-06-23 12:05:39 +02:00