summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/md4c/md4c.h
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2019-09-24 15:04:40 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2019-10-24 20:19:15 +0000
commitcffb88928cf945857a0983cac3e57f7b9d0befaa (patch)
tree70a03dcf276d608e400467b7efc18a3fac03d336 /src/3rdparty/md4c/md4c.h
parentd377d1f3a921488525f6e75c850632f559707747 (diff)
Update 3rdparty/md4c to post-0.3.4
0.3.4 is the newest tagged release. This updates to upstream 0354e1ab5a453e9913dcd5f87c2cfe9a2510dfda which has a change that affects behavior of the ".\n" case in QTBUG-78870 (it will be seen as a paragraph rather than a list item). Task-number: QTBUG-78870 Change-Id: Ib01f9c1d3f71a39782608da071c2f42512845382 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/3rdparty/md4c/md4c.h')
-rw-r--r--src/3rdparty/md4c/md4c.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/3rdparty/md4c/md4c.h b/src/3rdparty/md4c/md4c.h
index dcdadad88d..6d9fce5180 100644
--- a/src/3rdparty/md4c/md4c.h
+++ b/src/3rdparty/md4c/md4c.h
@@ -129,7 +129,13 @@ typedef enum MD_SPANTYPE {
/* <del>...</del>
* Note: Recognized only when MD_FLAG_STRIKETHROUGH is enabled.
*/
- MD_SPAN_DEL
+ MD_SPAN_DEL,
+
+ /* For recognizing inline ($) and display ($$) equations
+ * Note: Recognized only when MD_FLAG_LATEXMATHSPANS is enabled.
+ */
+ MD_SPAN_LATEXMATH,
+ MD_SPAN_LATEXMATH_DISPLAY
} MD_SPANTYPE;
/* Text is the actual textual contents of span. */
@@ -168,7 +174,11 @@ typedef enum MD_TEXTTYPE {
/* Text is a raw HTML. If it is contents of a raw HTML block (i.e. not
* an inline raw HTML), then MD_TEXT_BR and MD_TEXT_SOFTBR are not used.
* The text contains verbatim '\n' for the new lines. */
- MD_TEXT_HTML
+ MD_TEXT_HTML,
+
+ /* Text is inside an equation. This is processed the same way as inlined code
+ * spans (`code`). */
+ MD_TEXT_LATEXMATH
} MD_TEXTTYPE;
@@ -275,6 +285,7 @@ typedef struct MD_SPAN_IMG_DETAIL {
#define MD_FLAG_STRIKETHROUGH 0x0200 /* Enable strikethrough extension. */
#define MD_FLAG_PERMISSIVEWWWAUTOLINKS 0x0400 /* Enable WWW autolinks (even without any scheme prefix, if they begin with 'www.') */
#define MD_FLAG_TASKLISTS 0x0800 /* Enable task list extension. */
+#define MD_FLAG_LATEXMATHSPANS 0x1000 /* Enable $ and $$ containing LaTeX equations. */
#define MD_FLAG_PERMISSIVEAUTOLINKS (MD_FLAG_PERMISSIVEEMAILAUTOLINKS | MD_FLAG_PERMISSIVEURLAUTOLINKS | MD_FLAG_PERMISSIVEWWWAUTOLINKS)
#define MD_FLAG_NOHTML (MD_FLAG_NOHTMLBLOCKS | MD_FLAG_NOHTMLSPANS)