Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 single/double quote escapes codebox highlighter
someone posted this...
    if s[0] == "'" and s[-1] == "'":
and i remember there was an issue regarding the string of the codebox escaping incorrectly. But i 1) cant find that thread and 2) dont remember if we fixed this issue or not?
I don't remember if we have looked at this or it has ever come up.
It's a rare case,usually it it's more code like this.
'a' and 'b'
1 and 2
'l' and '4'
'''c''' and '''d'''
'4' or '7'
# The rare case
'"' and '"'
'"' and '&'
So i don't know if digging into regex for this is worth it,can also mess up something else.
I know we've talked about it before, but I can't find where it's mentioned specifically.  Lots of highlighter threads, though.

I think the issue is related to multiple different quote characters near each other, like the highlighter loses track of which one is the enclosing quote, or something, and ends up highlighting too much.  I also think it might be specifically related to single quotes.
"'" and "'"
'"' and '"'
" ' " and " ' "
' " ' and ' " '
So it appears to only happen when you string a single or double quotation mark by itself.

I guess that would be a rare case of someone doing that. But it is surely annoying. I might be in agreement, that it might make it worse by tweaking the regex. But i also might think it might be worth trying to tweak if it happens more in the future.

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  quote and double post Skaperen 14 2,521 Oct-14-2018, 04:29 AM
Last Post: wavic
  Fast Quote button doesn't work syogun 2 1,020 Sep-04-2017, 03:57 PM
Last Post: syogun
  codebox borders metulburr 15 8,586 Nov-24-2016, 04:04 AM
Last Post: snippsat
  URL not showing properly in comments of codebox Larz60+ 4 2,418 Nov-05-2016, 04:23 PM
Last Post: Larz60+
  More codebox issues Mekire 26 9,405 Oct-13-2016, 05:20 PM
Last Post: wavic
  Syntax Highlighter Codebox Issues metulburr 38 13,437 Oct-06-2016, 01:06 AM
Last Post: metulburr

Forum Jump:

Users browsing this thread: 1 Guest(s)