Browse Source

Don't enable --hardbreaks option in cmark

Discussion here: https://tild.es/ajm

Hard line breaks is unusual for Markdown, which normally follows HTML's
behavior with line break, and it isn't something that users familiar
with Markdown would expect.
merge-requests/56/head
Christopher Wellons 7 years ago
parent
commit
4a2d07733b
  1. 7
      tildes/tildes/lib/cmark.py

7
tildes/tildes/lib/cmark.py

@ -7,11 +7,10 @@ from ctypes import CDLL, c_char_p, c_int, c_size_t, c_void_p
CMARK_DLL = CDLL("/usr/local/lib/libcmark-gfm.so") CMARK_DLL = CDLL("/usr/local/lib/libcmark-gfm.so")
CMARK_EXT_DLL = CDLL("/usr/local/lib/libcmark-gfm-extensions.so") CMARK_EXT_DLL = CDLL("/usr/local/lib/libcmark-gfm-extensions.so")
# Enable the --hardbreaks and --unsafe options for cmark
# Can we import these somehow? They're defined in cmark.h as:
# CMARK_OPT_HARDBREAKS (1 << 2)
# Enable the --unsafe option for cmark
# Can we import this somehow? It's defined in cmark.h as:
# CMARK_OPT_UNSAFE (1 << 17) # CMARK_OPT_UNSAFE (1 << 17)
CMARK_OPTS = (1 << 2) | (1 << 17)
CMARK_OPTS = (1 << 17)
CMARK_EXTENSIONS = (b"autolink", b"strikethrough", b"table") CMARK_EXTENSIONS = (b"autolink", b"strikethrough", b"table")

Loading…
Cancel
Save