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

RE: 'xml.vim' and 'html.vim': htmlSpecialChar -- possible fixes?

Expand Messages
  • Jean Jordaan
    Hi Claudio JJJ ? The original misrecognizes   as an entity; all the way up to the JJJ semicolon. ... You re right, of course .. I realized that when the
    Message 1 of 3 , Feb 27, 2001
      Hi Claudio

      JJJ> ? The original misrecognizes   as an entity; all the way up to the
      JJJ> semicolon.

      > Actually, it does not, the semicolon has to be at most 6 characters from
      > the '&',

      You're right, of course .. I realized that when the message had gone out.
      Actually, when I wrote that, a comment in my 'myhtml.vim' had me under the
      impression that the original pattern ended in *, same as the 'xml.vim' one.
      Was this perhaps an earlier version? I neglected to fix the example.

      > but I agree that a better solution is needed. How about
      >
      > "&\(#[0-9]\{1,3\}\|[A-Za-z0-9]\{1,8}\);"

      Something like that .. that one doesn't take care of Rafael's é
      example. His suggestion is:

      syn match htmlSpecialChar "&#\=[a-zA-Z0-9]\+;"

      which doesn't make allowance for the possible length of entities like yours
      does. I guess it's worth trying to make this as accurate as possible, and
      not
      just "good enough"?

      Perhaps

      "&\(#[[:digit:]]\{1,3}\|#x[[:xdigit:]]\{1,2}\|[A-Za-z0-9]\{1,8}\);"

      ?

      --
      Jean Jordaan -- technical writer -- Mosaic Software
    Your message has been successfully submitted and would be delivered to recipients shortly.