Lax emphasis is the default
With no extension flags, Upskirt now matches the behavior of Gruber's Markdown when parsing emphasis without surrounded spaces.
This commit is contained in:
parent
22794bade8
commit
16b4342f24
2 changed files with 2 additions and 2 deletions
|
@ -415,7 +415,7 @@ parse_emph1(struct buf *ob, struct render *rndr, char *data, size_t size, char c
|
|||
|
||||
if (data[i] == c && !isspace(data[i - 1])) {
|
||||
|
||||
if ((rndr->ext_flags & MKDEXT_LAX_EMPHASIS) == 0) {
|
||||
if (rndr->ext_flags & MKDEXT_STRICT_EMPHASIS) {
|
||||
if (!(i + 1 == size || isspace(data[i + 1]) || ispunct(data[i + 1])))
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ enum mkd_autolink {
|
|||
};
|
||||
|
||||
enum mkd_extensions {
|
||||
MKDEXT_LAX_EMPHASIS = (1 << 0),
|
||||
MKDEXT_STRICT_EMPHASIS = (1 << 0),
|
||||
MKDEXT_TABLES = (1 << 1),
|
||||
MKDEXT_FENCED_CODE = (1 << 2),
|
||||
MKDEXT_AUTOLINK = (1 << 3),
|
||||
|
|
Loading…
Reference in a new issue