Don't require spacing around math spans (fix #120)
This commit is contained in:
parent
27e9e035fc
commit
5215172914
1 changed files with 1 additions and 5 deletions
|
@ -734,13 +734,9 @@ parse_math(hoedown_buffer *ob, hoedown_document *doc, uint8_t *data, size_t offs
|
||||||
/* prepare buffers */
|
/* prepare buffers */
|
||||||
hoedown_buffer text = { data + delimsz, i - delimsz, 0, 0, NULL, NULL, NULL };
|
hoedown_buffer text = { data + delimsz, i - delimsz, 0, 0, NULL, NULL, NULL };
|
||||||
|
|
||||||
/* enforce spacing around the span */
|
|
||||||
i += delimsz;
|
|
||||||
if (offset && !_isspace(data[-1])) return 0;
|
|
||||||
if (i < size && !_isspace(data[i])) return 0;
|
|
||||||
|
|
||||||
/* if this is a $$ and MATH_EXPLICIT is not active,
|
/* if this is a $$ and MATH_EXPLICIT is not active,
|
||||||
* guess wether displaymode should be enabled from the context */
|
* guess wether displaymode should be enabled from the context */
|
||||||
|
i += delimsz;
|
||||||
if (delimsz == 2 && !(doc->ext_flags & HOEDOWN_EXT_MATH_EXPLICIT))
|
if (delimsz == 2 && !(doc->ext_flags & HOEDOWN_EXT_MATH_EXPLICIT))
|
||||||
displaymode = is_empty_all(data - offset, offset) && is_empty_all(data + i, size - i);
|
displaymode = is_empty_all(data - offset, offset) && is_empty_all(data + i, size - i);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue