.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / remark-parse / lib / util / html.js
1 'use strict';
2
3 var attributeName = '[a-zA-Z_:][a-zA-Z0-9:._-]*';
4 var unquoted = '[^"\'=<>`\\u0000-\\u0020]+';
5 var singleQuoted = '\'[^\']*\'';
6 var doubleQuoted = '"[^"]*"';
7 var attributeValue = '(?:' + unquoted + '|' + singleQuoted + '|' + doubleQuoted + ')';
8 var attribute = '(?:\\s+' + attributeName + '(?:\\s*=\\s*' + attributeValue + ')?)';
9 var openTag = '<[A-Za-z][A-Za-z0-9\\-]*' + attribute + '*\\s*\\/?>';
10 var closeTag = '<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>';
11 var comment = '<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->';
12 var processing = '<[?].*?[?]>';
13 var declaration = '<![A-Za-z]+\\s+[^>]*>';
14 var cdata = '<!\\[CDATA\\[[\\s\\S]*?\\]\\]>';
15
16 exports.openCloseTag = new RegExp('^(?:' + openTag + '|' + closeTag + ')');
17
18 exports.tag = new RegExp('^(?:' +
19   openTag + '|' +
20   closeTag + '|' +
21   comment + '|' +
22   processing + '|' +
23   declaration + '|' +
24   cdata +
25 ')');