Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 single/double quote escapes codebox highlighter
#1
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?
Quote
#2
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.
Quote
#3
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.
Quote
#4
"'" 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.
Quote

Top Page

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

Forum Jump:


Users browsing this thread: 1 Guest(s)