mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-02 02:08:24 +08:00
This also adds CC-BY-4.0 to the list of accepted licenses. DISABLE_THIRD_PARTY_CHECK=update dependencies Bug: chromium:1083142 Change-Id: I8612de2fba52dae32eeb71af79d5aacfde52142b Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2220097 Reviewed-by: Paul Lewis <aerotwist@chromium.org> Commit-Queue: Mathias Bynens <mathias@chromium.org>
35 lines
893 B
JavaScript
35 lines
893 B
JavaScript
'use strict'
|
|
|
|
var attributeName = '[a-zA-Z_:][a-zA-Z0-9:._-]*'
|
|
var unquoted = '[^"\'=<>`\\u0000-\\u0020]+'
|
|
var singleQuoted = "'[^']*'"
|
|
var doubleQuoted = '"[^"]*"'
|
|
var attributeValue =
|
|
'(?:' + unquoted + '|' + singleQuoted + '|' + doubleQuoted + ')'
|
|
var attribute =
|
|
'(?:\\s+' + attributeName + '(?:\\s*=\\s*' + attributeValue + ')?)'
|
|
var openTag = '<[A-Za-z][A-Za-z0-9\\-]*' + attribute + '*\\s*\\/?>'
|
|
var closeTag = '<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>'
|
|
var comment = '<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->'
|
|
var processing = '<[?].*?[?]>'
|
|
var declaration = '<![A-Za-z]+\\s+[^>]*>'
|
|
var cdata = '<!\\[CDATA\\[[\\s\\S]*?\\]\\]>'
|
|
|
|
exports.openCloseTag = new RegExp('^(?:' + openTag + '|' + closeTag + ')')
|
|
|
|
exports.tag = new RegExp(
|
|
'^(?:' +
|
|
openTag +
|
|
'|' +
|
|
closeTag +
|
|
'|' +
|
|
comment +
|
|
'|' +
|
|
processing +
|
|
'|' +
|
|
declaration +
|
|
'|' +
|
|
cdata +
|
|
')'
|
|
)
|