Loading ...
Sorry, an error occurred while loading the content.

[PATCH] JavaScript syntax highlighting RegExp modifiers

Expand Messages
  • Kevin Locke
    Hello All, The JavaScript syntax file does not currently highlight regular expression literals which contain any modifiers other than g and/or i. So, for
    Message 1 of 1 , May 9, 2013
    • 0 Attachment
      Hello All,

      The JavaScript syntax file does not currently highlight regular
      expression literals which contain any modifiers other than g and/or i.
      So, for example, the following literal would not be highlighted

      /^Match me$/gm

      ECMA-262 edition 5.1[1] defines the flags in the syntax in §7.8.5 as
      being any IdentifierPart, although it is currently limited to the
      characters "g", "i", and "m" in §15.10.4.1. Mozilla also supports
      a non-standard "y" modifier.[2] I am not aware of any others.

      The attached patch adds support for the "m" modifier.

      I tried emailing this to Claudio Fleiner, who is listed as the current
      maintainer in the file header 2 weeks ago, but since I haven't
      received a response, I decided to follow-up here. I hope that is not
      a severe breach of protocol.

      Thanks for considering,
      Kevin


      1. http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-262%20edition%205.1,%20June%202011.pdf
      2. https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/RegExp

      --
      --
      You received this message from the "vim_dev" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php

      ---
      You received this message because you are subscribed to the Google Groups "vim_dev" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    Your message has been successfully submitted and would be delivered to recipients shortly.