cmark

My personal build of CMark ✏️

Commit
072b4313a4de233df624776dcd9892e5dd24b8d8
Parent
2673db7a57cc4d2ba8aaec2769572a6e539c921b
Author
John MacFarlane <jgm@berkeley.edu>
Date

pathological_tests.py: limit to 65000 reps.

This is because some versions of python have a limit of N = 65535 in regex `{N}`.

Diffstat

1 file changed, 3 insertions, 2 deletions

Status File Name N° Changes Insertions Deletions
Modified test/pathological_tests.py 5 3 2
diff --git a/test/pathological_tests.py b/test/pathological_tests.py
@@ -19,9 +19,10 @@ cmark = CMark(prog=args.program, library_dir=args.library_dir)
 
 # list of pairs consisting of input and a regex that must match the output.
 pathological = {
+    # note - some pythons have limit of 65535 for {num-matches} in re.
     "nested strong emph":
-                (("*a **a " * 100000) + "b" + (" a** a*" * 100000),
-                 re.compile("(<em>a <strong>a ){100000}b( a</strong> a</em>){100000}")),
+                (("*a **a " * 65000) + "b" + (" a** a*" * 65000),
+                 re.compile("(<em>a <strong>a ){65000}b( a</strong> a</em>){65000}")),
     "nested brackets":
                  (("[" * 50000) + "a" + ("]" * 50000),
                   re.compile("\[{50000}a\]{50000}")),