-1

Sometimes I put a short bit of code in a comment, maybe as a suggestion for improvement to question or answer.

Sometimes I get it wrong first time, and hit edit to get it right.

This used to work and preserved the markdown. But right now it creates a bit of a mess. It loses markdown, spaces and underscores, plus it duplicates code segments inside backtick markers. This just had me scrambling to correct my comment inside the 5 minute window . . .

Is this a bug, or is a there a new better way of having code segment markdown in comments?

If relevant, browser is Chrome, on a Mac OS X.


Replication steps (done as a comment on this question):

  1. Click "Add a comment" on any question or answer

Step 1

  1. Save the comment. So far, so good.

Step 2

  1. Click "edit" on the comment inside 5 minute window:

Step 3

  1. Save the edit (which shows it is not just the text box having this problem)

Step 4

18
  • Example original comment: var_a + var_b Commented Apr 3, 2016 at 18:11
  • Example comment edited: vara+varbvara+varbvar_a + var_b Commented Apr 3, 2016 at 18:11
  • Testing, testing, testing... Commented Apr 3, 2016 at 18:16
  • I didn't repro above. Are underscores required for this problem? Commented Apr 3, 2016 at 18:17
  • Without underscores: test∈g,test∈gtest∈g,test∈gtesting, testing Commented Apr 3, 2016 at 18:18
  • Maybe some browser specific thing then? No issue on IPad Safari. Commented Apr 3, 2016 at 18:18
  • @MartinSmith: No, in fact as you see I got even weirder result doing same as you. I see the fault as soon as I hit edit, and in the garbled version above just saving as-is. What is then saved matches exactly what I see in the edit text box. Commented Apr 3, 2016 at 18:20
  • 1
    'If relevant, browser is Chrome' - what a surprise. Next... :) Commented Apr 3, 2016 at 18:28
  • 2
    Could you edit the question with the exact steps? I can't reproduce this either. Possibly with screenshots and red-circles :p
    – Tunaki
    Commented Apr 3, 2016 at 18:28
  • @Neil, does this persist across page reloads / browser sessions? Does it survive safe mode? Commented Apr 3, 2016 at 18:30
  • Example for screenshot: a=b+ca=b+ca = b + c Commented Apr 3, 2016 at 19:12
  • Without MathJax for Chrome plugin: a=b+ca=b+ca = b + c. Nope not that (only plugin I added recently) Commented Apr 3, 2016 at 19:16
  • 4
    Have any of the people voting "cannot reproduce" actually tested it on Chrome on a Mac? Commented Apr 3, 2016 at 19:19
  • 1
    New session (signed in Incognito mode): a + b = c - aha that works OK. Looks like it is something in the session, @FrédéricHamidi thanks for the suggestion. Commented Apr 3, 2016 at 19:35
  • 2
    @MartinSmith: I think that's a direct hit. I enabled MathJax plugin, and it looks likely that is the culprit. Although disabling the plugin didn't seem to clear the fault earlier . . . Commented Apr 3, 2016 at 19:42

1 Answer 1

3

From suggestions in comments, and experiments with Incognito mode plus enabling the few plugins I have, it looks like this fault is triggered by Chrome's MathJax plugin.

It seems that this plugin and editing markdown with back-ticks in HTML text box are not compatible.

I enabled MathJax for Kaggle, not Stack Overflow, and it's only for convenience on a few of the former's pages. So I will just remove the plugin. From my experience it seems it may need to be completely removed, not just disabled.

If anyone else experiences something similar, then I hope this will help. If you must have the MathJax plugin, then I am not sure what the options are.

Not the answer you're looking for? Browse other questions tagged .