Skip to content

Commit

Permalink
HTML attribute name
Browse files Browse the repository at this point in the history
A HTML attribute name can have e.g. a XML namespace in it and thus containing a colon (`:`) like:
```
<span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">Social Icons</span>
```
but this results in
```
warning: found </span> tag without matching <span>
```
and grabled outpuzt.

allowing a colon in the attribute name solves this problem
  • Loading branch information
albert-github committed Sep 23, 2019
1 parent 1024ab1 commit 648d871
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/doctokenizer.l
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ LISTITEM {BLANK}*[-]("#")?{WS}
MLISTITEM {BLANK}*[+*]{WS}
OLISTITEM {BLANK}*[1-9][0-9]*"."{BLANK}
ENDLIST {BLANK}*"."{BLANK}*\n
ATTRNAME [a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF\-]*
ATTRNAME [a-z_A-Z\x80-\xFF][:a-z_A-Z0-9\x80-\xFF\-]*
ATTRIB {ATTRNAME}{WS}*("="{WS}*(("\""[^\"]*"\"")|("'"[^\']*"'")|[^ \t\r\n'"><]+))?
URLCHAR [a-z_A-Z0-9\!\~\,\:\;\'\$\?\@\&\%\#\.\-\+\/\=]
URLMASK ({URLCHAR}+([({]{URLCHAR}*[)}])?)+
Expand Down

0 comments on commit 648d871

Please sign in to comment.