diff --git a/package-lock.json b/package-lock.json index ba9a41e2..30e04c7a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,7 +23,7 @@ "eslint-plugin-node": "^11.1.0", "eslint-plugin-unicorn": "^50.0.1", "jest": "^29.7.0", - "prettier": "^3.0.3", + "prettier": "^3.1.1", "ts-jest": "^29.1.1", "typedoc": "^0.25.6", "typescript": "^5.3.3" @@ -4388,9 +4388,9 @@ } }, "node_modules/prettier": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz", - "integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.1.1.tgz", + "integrity": "sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==", "dev": true, "bin": { "prettier": "bin/prettier.cjs" diff --git a/package.json b/package.json index c1b968b0..fd4e01d8 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "eslint-plugin-node": "^11.1.0", "eslint-plugin-unicorn": "^50.0.1", "jest": "^29.7.0", - "prettier": "^3.0.3", + "prettier": "^3.1.1", "ts-jest": "^29.1.1", "typedoc": "^0.25.6", "typescript": "^5.3.3" diff --git a/src/sniffer.ts b/src/sniffer.ts index 3d1dcd2b..629ab2f5 100644 --- a/src/sniffer.ts +++ b/src/sniffer.ts @@ -214,11 +214,11 @@ export class Sniffer { encoding === "x-user-defined" ? "windows-1252" : // Check if we are in a meta tag or xml declaration, and the encoding is UTF-16 - (type === ResultType.META_TAG || - type === ResultType.XML_ENCODING) && - (encoding === "UTF-16LE" || encoding === "UTF-16BE") - ? "UTF-8" - : encoding; + (type === ResultType.META_TAG || + type === ResultType.XML_ENCODING) && + (encoding === "UTF-16LE" || encoding === "UTF-16BE") + ? "UTF-8" + : encoding; this.resultType = type; } @@ -605,8 +605,8 @@ export class Sniffer { this.attribType === AttribType.Content ? State.MetaContentValueQuotedBeforeEncoding : this.attribType === AttribType.HttpEquiv - ? State.MetaAttribHttpEquivValue - : State.AttributeValueQuoted; + ? State.MetaAttribHttpEquivValue + : State.AttributeValueQuoted; } else if (this.attribType === AttribType.Content) { this.state = State.MetaContentValueUnquotedBeforeEncoding; this.stateMetaContentValueUnquotedBeforeEncoding(c);