V4.2: Syntax highlighting for nested quotes (re-entered with line breaks)
Submitted by Wednesday, 8 December, 2004 - 02:38
on
Hello everyone, I am a new user to jEdit and love it. However, I am
having a problem trying set up the SPAN/SPAN_REGEXP to handle nested
quotes.
The language I am trying to handle is an implementation of Lua (CELX
scripting for the open source program Celestia), and allows the
double and single quotes to be included in strings using a backslash.
for example:
text = "the \" character is a quotation mark"
more = "hello"
The default rules for Lua highlights would cause - "the \" - to be
higlighted as quoted, - character is a quotation mark - to be treated
as code and - " more = " - to be highlighted as quotes.
Essentially, I need to jEdit to recognise that " and ' are only
quotes if they are not preceeded by a \. I tried using SPAN_REGEXP.
This worked for recognising the opening quotes, but since the tag is
not evaluated as a regular expression, I could find no way to get it
to skip occurences of \" and \'.
Does anyone know of a way to do this? Thank you.
Clive Pottinger
having a problem trying set up the SPAN/SPAN_REGEXP to handle nested
quotes.
The language I am trying to handle is an implementation of Lua (CELX
scripting for the open source program Celestia), and allows the
double and single quotes to be included in strings using a backslash.
for example:
text = "the \" character is a quotation mark"
more = "hello"
The default rules for Lua highlights would cause - "the \" - to be
higlighted as quoted, - character is a quotation mark - to be treated
as code and - " more = " - to be highlighted as quotes.
Essentially, I need to jEdit to recognise that " and ' are only
quotes if they are not preceeded by a \. I tried using SPAN_REGEXP.
This worked for recognising the opening quotes, but since the tag is
not evaluated as a regular expression, I could find no way to get it
to skip occurences of \" and \'.
Does anyone know of a way to do this? Thank you.
Clive Pottinger