17

Currently on SO using:

<!-- language: c++ -->  

Makes subsequent editing of a post fail, none of the editor buttons are visible and the keyboard shortcuts do nothing. Firefox gives an error in the console:

Syntax error wmd.en.js:2

and Chrome fails identically. Using the following hint instead works as expected:

<!-- language: lang-cpp -->

This was observed with the initial revision of my answer to: How to use weak_ptr in swig? and can still be reproduced by attempting editing revision 1.

1
  • 2
    Chrome gives console error Uncaught SyntaxError: Invalid regular expression: /^c++/: Nothing to repeat.
    – ecatmur
    Commented Jul 23, 2014 at 10:48

1 Answer 1

5

I replaced the use of a regular expression there with a "startswith" function that does the same.

Given that it was an invalid regular expression causing the issue, that's now sorted!

You must log in to answer this question.

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