--- Begin Message ---
Subject: |
25.0.50; css-mode: Comments within URIs |
Date: |
Sat, 20 Jun 2015 17:04:38 +0200 |
In CSS, the syntax of URIs is described as follows:
The format of a URI value is 'url(' followed by optional white space
followed by an optional single quote (') or double quote (")
character followed by the URI itself, followed by an optional single
quote (') or double quote (") character followed by optional white
space followed by ')'. The two quote characters must be the
same. [1]
This means that all of the following are legal URI entries:
However, css-mode doesn't currently interpret the stuff between the
parenthesis in the quote-less form as strings. This means that URIs
containing /* (or // in scss-mode, which is more common for URIs) will
be interpreted as comment starters by Emacs.
I attempted to fix this by setting syntax-propertize-function to the
following:
(syntax-propertize-rules
("url\\(\(\\)[[:space:]]*[[:graph:]]*[[:space:]]*\\(\)\\)"
(1 "|") (2 "|")))
This almost solves the problem, but with the quirk that "(" and ")"
are interpreted as part of the string.
Would it be possible to assign string syntax to the stuff between the
two parenthesis without having any visible string delimiters? I'm
thankful for any hints for getting closer to a solution!
-- Simen
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#20859: 25.0.50; css-mode: Comments within URIs |
Date: |
Sat, 22 Aug 2015 19:21:39 +0200 |
On Sat, Aug 22, 2015 at 4:47 PM, Stefan Monnier <address@hidden> wrote:
Good. With this cleared, I think the patch is ready to go. Feel free
to install it, thanks,
Thanks Stefan. Installed!
-- Simen
--- End Message ---