6
\$\begingroup\$

I've noticed that sometimes, when editing a schematic (but not adding a new schematic) to a question, that some of the text above the schematic will be eaten. It's not just me, either. See my latest revision at https://electronics.stackexchange.com/posts/61699/revisions

I can reproduce this problem by:

  • editing that answer
  • clicking "edit the above schematic" for the first schematic
  • click "save and insert" in circuitlab (no need to even make changes)

After these steps, some of the text that was before the schematic gets eaten, and the comment markers around the schematic are improperly nested. See the revision just before my fixes for an example.

I'm using Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:22.0) Gecko/20100101 Firefox/22.0.

What's causing this? Can it be fixed?

\$\endgroup\$
  • \$\begingroup\$ Lets work on finding a minimum number of steps to reproduce the problem \$\endgroup\$ – W5VO Jul 2 '13 at 14:33
  • \$\begingroup\$ @W5VO I guess that means you've never experienced this, because it happens to me more often than not. Anyhow, reproduction steps added. \$\endgroup\$ – Phil Frost Jul 2 '13 at 14:38
  • \$\begingroup\$ It looks like it's deleting 13 characters before the <!-- Begin segment. I can reproduce this in Chrome. \$\endgroup\$ – W5VO Jul 2 '13 at 15:12
  • 1
    \$\begingroup\$ I'm working on this, but this may be a fairly complicated fix, so I can't promise to have it done today. This issue will only appear in posts that contain LaTeX before the schematic. \$\endgroup\$ – balpha Jul 2 '13 at 16:23
3
\$\begingroup\$

This is fixed in the next build.

Part of the editor logic is implemented as a PageDown plugin, and that part didn't take into account the possibility that another plugin may be modifying the Markdown source as well, and thus the content inside the text editor may be different from the Markdown that was passed to the plugin.

The other plugin in this case was the code that separates LaTeX content from the rest of the text, which is why the problem only appeared if the post contained TeX content before the schematic. It also only happened when editing an already-present schematic, not when adding a new one. This combination of events is so rare that it took until now for this to be noticed.

Thanks for the bug report!

\$\endgroup\$
  • 3
    \$\begingroup\$ Funny that you say it's so rare. It happens to me every day. I guess more people should learn to use \$\LaTeX\$ :) \$\endgroup\$ – Phil Frost Jul 3 '13 at 11:36
  • 2
    \$\begingroup\$ Well, it was rare enough to take until now for someone to post a bug report :) \$\endgroup\$ – balpha Jul 3 '13 at 11:42
  • \$\begingroup\$ Seems fixed now. Thanks! \$\endgroup\$ – Phil Frost Jul 10 '13 at 20:10

You must log in to answer this question.

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