Formatting

This commit is contained in:
Wilson Lin 2021-08-09 19:56:37 +10:00
commit 19abe390d4
23 changed files with 181 additions and 96 deletions

View file

@ -49,7 +49,15 @@ const SINGLE_QUOTE = [c("'")];
// Official characters allowed in an attribute name.
// NOTE: Unicode noncharacters not tested.
// See https://html.spec.whatwg.org/multipage/syntax.html#syntax-attribute-name for spec.
const WHATWG_ATTR_NAME_CHAR = invert([...CONTROL, c(' '), c('"'), c('\''), c('>'), c('/'), c('=')]);
const WHATWG_ATTR_NAME_CHAR = invert([
...CONTROL,
c(" "),
c('"'),
c("'"),
c(">"),
c("/"),
c("="),
]);
// Valid attribute quote characters.
// See https://html.spec.whatwg.org/multipage/introduction.html#intro-early-example for spec.
// Backtick is not a valid quote character according to spec.

View file

@ -1,14 +1,9 @@
{
"private": true,
"scripts": {
"format": "prettier -w '*.{ts,json}'"
},
"dependencies": {
"@types/node": "^14.0.5",
"@wzlin/html-data": "^2021080714.0.0",
"prettier": "2.3.2",
"ts-node": "^8.10.1",
"typescript": "^3.7.4",
"yaml": "^1.10.0"
"typescript": "^3.7.4"
}
}