diff options
author | Yuki Izumi <kivikakk@github.com> | 2016-11-05 09:04:48 +1100 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2016-11-04 23:04:48 +0100 |
commit | 64e1394ae76409f02b00c254f119a64a2d1ce11e (patch) | |
tree | 4ad30178f0a166666dce869ea5efeb3537cbd61e /tools | |
parent | 14fe768690b3948c7c1f67f463eb4620fc5746c9 (diff) |
Fix for non-matching entities (#161)
* Add test to illustrate issue
* Provide some test fixes
* Don't neglect CounterClockwiseContourIntegral
* Fix ~10% of cases not matching
strncmp returns 0 if the first 'len' bytes of cmark_entities[i].entity
match s; we check equal length in the first if by checking if
cmark_entities[i].entity[len] == 0, but we neglect the case where cmp ==
0 && cmark_entities[i].entity[len] != 0. This should be treated as the
same as cmp < 0, because strcmp("abc", "abcd") < 0.
* Don't depend on py3.3 in tests
Diffstat (limited to 'tools')
-rw-r--r-- | tools/make_entities_inc.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/make_entities_inc.py b/tools/make_entities_inc.py index 7ed307b..7b8ee41 100644 --- a/tools/make_entities_inc.py +++ b/tools/make_entities_inc.py @@ -20,7 +20,7 @@ struct cmark_entity_node { }; #define CMARK_ENTITY_MIN_LENGTH 2 -#define CMARK_ENTITY_MAX_LENGTH 31""") +#define CMARK_ENTITY_MAX_LENGTH 32""") print("#define CMARK_NUM_ENTITIES " + str(len(entities))); |