Skip to content

Commit

Permalink
Allow tabs after setext header underline.
Browse files Browse the repository at this point in the history
Fixes #215.
  • Loading branch information
mity committed Jan 12, 2024
1 parent 2750d9f commit 7497ea9
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ Fixes:
* [#214](https://github.com/mity/md4c/issues/214):
Tags `<h2>` ... `<h6>` incorrectly did not trigger HTML block.

* [#215](https://github.com/mity/md4c/issues/215):
The parser incorrectly did not accept optional tabs after setext header
underline.


## Version 0.4.8

Expand Down
4 changes: 2 additions & 2 deletions src/md4c.c
Original file line number Diff line number Diff line change
Expand Up @@ -5216,8 +5216,8 @@ md_is_setext_underline(MD_CTX* ctx, OFF beg, OFF* p_end, unsigned* p_level)
while(off < ctx->size && CH(off) == CH(beg))
off++;

/* Optionally, space(s) can follow. */
while(off < ctx->size && CH(off) == _T(' '))
/* Optionally, space(s) or tabs can follow. */
while(off < ctx->size && ISBLANK(off))
off++;

/* But nothing more is allowed on the line. */
Expand Down
10 changes: 10 additions & 0 deletions test/coverage.txt
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,16 @@ _bar_
````````````````````````````````


### [Issue 215](https://github.com/mity/md4c/issues/215)

```````````````````````````````` example
title
--→
.
<h2>title</h2>
````````````````````````````````


## Code coverage

### `md_is_unicode_whitespace__()`
Expand Down

0 comments on commit 7497ea9

Please sign in to comment.