emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#20859: closed (25.0.50; css-mode: Comments within


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#20859: closed (25.0.50; css-mode: Comments within URIs)
Date: Sat, 22 Aug 2015 17:22:02 +0000

Your message dated Sat, 22 Aug 2015 19:21:39 +0200
with message-id <address@hidden>
and subject line Re: bug#20859: 25.0.50; css-mode: Comments within URIs
has caused the debbugs.gnu.org bug report #20859,
regarding 25.0.50; css-mode: Comments within URIs
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
20859: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20859
GNU Bug Tracking System
Contact address@hidden with problems
--- 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:

  url("http://www.example.com/")
  url('http://www.example.com/')
  url(http://www.example.com/)

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


[1] http://www.w3.org/TR/CSS21/syndata.html#uri

--- 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 ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]