cmark-gfm icon indicating copy to clipboard operation
cmark-gfm copied to clipboard

cmark_utf8proc_is_space called twice?

Open 1vanK opened this issue 6 years ago • 1 comments

https://github.com/github/cmark-gfm/blob/36c1553d2a1f04dc1628e76b18490edeff78b8d0/src/inlines.c#L1575

  space_before = cmark_utf8proc_is_space(before_char) != 0;
  space_after = cmark_utf8proc_is_space(after_char) != 0;

  *left_flanking = numdelims > 0 && !cmark_utf8proc_is_space(after_char) &&
                  !(*punct_after && !space_before && !*punct_before);
  *right_flanking = numdelims > 0 && !cmark_utf8proc_is_space(before_char) &&
                  !(*punct_before && !space_after && !*punct_after);

1vanK avatar Nov 29 '19 12:11 1vanK

This can be refactored, yes.

kivikakk avatar Nov 30 '19 00:11 kivikakk