Seems like there is a bug, that breaks my indentation.
See
In third code section of Create New C++ Class
In first code section of Code Generator Generator
enter image description here
multiple times in the code section of https://codereview.stackexchange.com/a/84104/ (Perl syntax naturally includes both
\$
and$$
).
This occurs on both block delimiters and inline delimiters. Live minimal test case:
$$
b0rked
$$
and
\$
b0rked
\$
In the Markdown source, all lines are vertically aligned, not additionally indented
-
2\$\begingroup\$ Hmmm... I can reproduce it, and do not understand why it is broken..... \$\endgroup\$rolfl– rolfl Mod2015年02月15日 15:07:57 +00:00Commented Feb 15, 2015 at 15:07
-
2\$\begingroup\$ Yikes, creepy.... \$\endgroup\$janos– janos2015年02月15日 15:33:04 +00:00Commented Feb 15, 2015 at 15:33
-
\$\begingroup\$ reproduced on our dev environment, it's mathjax related, happens when we're baking a post's markdown to html, looking into it \$\endgroup\$m0sa– m0sa Mod2015年02月16日 15:49:41 +00:00Commented Feb 16, 2015 at 15:49
-
3\$\begingroup\$ @m0sa has there been any progress on this problem? I was baffled why my code – even in the editor preview – had this random extra indentation. That kind of sucks for a site that's about clean code, which involves proper formatting. \$\endgroup\$amon– amon2015年03月16日 08:07:10 +00:00Commented Mar 16, 2015 at 8:07
-
\$\begingroup\$ @amon I looked into it, turned out to be a deep rabbit hole requiring at major refactoring of MarkdownSharp (we'd need to make the pipeline extensible, so we could inject stuff before DoCodeBlocks in RunBlockGamut - currently all the processing happens before we ever hit MarkdownSharp, but we'd need to leverage it's block processing) \$\endgroup\$m0sa– m0sa Mod2015年03月16日 11:49:16 +00:00Commented Mar 16, 2015 at 11:49
-
2\$\begingroup\$ Similar issue from PPCG. /cc @m0sa \$\endgroup\$Doorknob– Doorknob2015年04月08日 21:00:14 +00:00Commented Apr 8, 2015 at 21:00
1 Answer 1
This seems to happen because of the above line having two $
in a row.
static std::string TOKEN_LINEDUMP("$$
static std::string TOKEN_INDENTNEXT("$$>");
Removing the second $
on the first line causes it to be shown normal:
static std::string TOKEN_LINEDUMP("$
static std::string TOKEN_INDENTNEXT("$$>");
Further investigation is needed.
-
5\$\begingroup\$ is this related to mathjax?? \$\endgroup\$Vogel612– Vogel6122015年02月15日 15:50:51 +00:00Commented Feb 15, 2015 at 15:50
-
1\$\begingroup\$ Actually, removing any of the
$
will stop the indentation. This does make it look like a MathJax issue. \$\endgroup\$2015年02月16日 01:40:30 +00:00Commented Feb 16, 2015 at 1:40 -
1\$\begingroup\$ FYI, this is not due to MathJax itself since MathJax stops parsing at HTML elements, so it won't touch
<span class="str">"$$>"</span>
etc. However, it could have something to do with the way StackExchange's editor isolates LaTeX-input from the Markdown processor. \$\endgroup\$Peter Krautzberger– Peter Krautzberger2015年02月17日 13:25:28 +00:00Commented Feb 17, 2015 at 13:25 -
\$\begingroup\$ Could we not have some
<!-- mathjax:off -->
magic comment to switch off MathJax on top of a code block? \$\endgroup\$2015年10月17日 23:22:27 +00:00Commented Oct 17, 2015 at 23:22
You must log in to answer this question.
Explore related questions
See similar questions with these tags.