Skip to content

Commit

Permalink
Allow non-initial hyphens in html tag names.
Browse files Browse the repository at this point in the history
This allows for custom tags, which in HTML5 MUST contain
a hyphen.  See commonmark/commonmark-spec#239.
  • Loading branch information
jgm committed Jul 11, 2015
1 parent 8b76f5e commit c2d778e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ var decodeHTML = require('entities').decodeHTML;

var ENTITY = "&(?:#x[a-f0-9]{1,8}|#[0-9]{1,8}|[a-z][a-z0-9]{1,31});";

var TAGNAME = '[A-Za-z][A-Za-z0-9]*';
var TAGNAME = '[A-Za-z][A-Za-z0-9-]*';
var ATTRIBUTENAME = '[a-zA-Z_:][a-zA-Z0-9:._-]*';
var UNQUOTEDVALUE = "[^\"'=<>`\\x00-\\x20]+";
var SINGLEQUOTEDVALUE = "'[^']*'";
Expand Down

0 comments on commit c2d778e

Please sign in to comment.