mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 15:03:34 +00:00
bugdown: Fix $$ whitespace handling.
The intended use of $$ is for inline expressions, not for multiline ones; ```math is an acceptable alternative for the latter. Hence, the $$-syntax for inline TeX no longer permits newlines within it. This was also necessary for the next change to be sensible; namely allowing for spaces around both $$ when crafting inline TeX instead of forcing everything to be crammed together, e.g. $$x=7$$. In order to avoid uninentionally creating inline expressions, the opening and closing $$'s of an inline expression must now both exactly consist of two dollar signs, no more and no less. Fixes: #6488.
This commit is contained in:
@@ -519,7 +519,7 @@ inline.zulip = merge({}, inline.breaks, {
|
||||
stream: /^#\*\*([^\*]+)\*\*/,
|
||||
avatar: /^!avatar\(([^)]+)\)/,
|
||||
gravatar: /^!gravatar\(([^)]+)\)/,
|
||||
tex: /^(\$\$([^ _$](\\\$|[^$])*)(?! )\$\$)\B/,
|
||||
tex: /^(\$\$([^\n_$](\\\$|[^\n$])*)\$\$(?!\$))\B/,
|
||||
realm_filters: [],
|
||||
text: replace(inline.breaks.text)
|
||||
('|', '|(\ud83c[\udd00-\udfff]|\ud83d[\udc00-\ude4f]|' +
|
||||
@@ -527,6 +527,7 @@ inline.zulip = merge({}, inline.breaks, {
|
||||
'[\u2000-\u206F]|[\u2300-\u27BF]|[\u2B00-\u2BFF]|' +
|
||||
'[\u3000-\u303F]|[\u3200-\u32FF])|')
|
||||
(']|', '#@:]|')
|
||||
('^[', '^^\\${3,}|^^[')
|
||||
()
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user