diff --git a/salt/salt/cmark-gfm.sls b/salt/salt/cmark-gfm.sls index df7a794..efd7276 100644 --- a/salt/salt/cmark-gfm.sls +++ b/salt/salt/cmark-gfm.sls @@ -3,8 +3,8 @@ unpack-cmark-gfm: - name: /tmp/cmark-gfm - source: - salt://cmark-gfm.tar.gz - - https://github.com/github/cmark-gfm/archive/0.28.3.gfm.17.tar.gz - - source_hash: sha256=101ccfcd4f0fd8b05c20994006d992f2e81d6f96655afee4c66742ccc21f1f7d + - https://github.com/github/cmark-gfm/archive/0.28.3.gfm.19.tar.gz + - source_hash: sha256=d2c8cb255e227d07533a32cfd4a052e189f697e2a9681d8b17d15654259e2e4b - if_missing: /usr/local/lib/libcmark-gfm.so - options: --strip-components=1 - enforce_toplevel: False diff --git a/tildes/tildes/lib/cmark.py b/tildes/tildes/lib/cmark.py index 6180068..249a796 100644 --- a/tildes/tildes/lib/cmark.py +++ b/tildes/tildes/lib/cmark.py @@ -7,9 +7,11 @@ 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_EXT_DLL = CDLL("/usr/local/lib/libcmark-gfm-extensions.so") -# enables the --hardbreaks option for cmark -# (can I import this? it's defined in cmark.h as CMARK_OPT_HARDBREAKS) -CMARK_OPTS = 4 +# 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) +# CMARK_OPT_UNSAFE (1 << 17) +CMARK_OPTS = (1 << 2) | (1 << 17) CMARK_EXTENSIONS = (b"strikethrough", b"table")