1. Georg Brandl
  2. pygments-main
  3. Issues
Issue #846 resolved

HTML lexer doesn't handle elements with dashes in tag name

Anonymous created an issue

The html lexer generates <span class="err">'s on closing elements with dashes in the name, e.g. You can see this in the following inline example that's using (presumably) the same HTML lexer:

<x-tag>Hello</x-tag>

Here's the the same code without specifying a lexer:

<x-tag>Hello</x-tag>

This isn't a standard HTML tag, but custom elements/web components will have dashes in their names (e.g, http://www.x-tags.org/index).

Comments (3)

  1. Richard Dallaway

    Possibly related, I have similar output for:

    <lift:notice_class>boxed</lift:notice_class>
    

    Where by the _class part has different formatting, and the closing of the tag is not formatted:

    <lift:notice_class>boxed</lift:notice_class>
    
  2. Log in to comment