Bug 1747394 - Check for space-like bytes instead of just space after a copyright sign. r=dminor

Differential Revision: https://phabricator.services.mozilla.com/D134609
This commit is contained in:
Henri Sivonen 2021-12-23 13:37:43 +00:00
Родитель 917c511c5f
Коммит cc4a22e024
5 изменённых файлов: 5 добавлений и 5 удалений

Просмотреть файл

@ -84,7 +84,7 @@ rev = "ed8a4c6f900a90d4dbc1d64b856e61490a1c3570"
[source."https://github.com/hsivonen/chardetng"]
git = "https://github.com/hsivonen/chardetng"
replace-with = "vendored-sources"
rev = "cb8052aaf9c4bca3bea4a579667441cc3ba7537c"
rev = "3484d3e3ebdc8931493aa5df4d7ee9360a90e76b"
[source."https://github.com/grovesNL/glow"]
git = "https://github.com/grovesNL/glow"

2
Cargo.lock сгенерированный
Просмотреть файл

@ -678,7 +678,7 @@ checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e"
[[package]]
name = "chardetng"
version = "0.1.9"
source = "git+https://github.com/hsivonen/chardetng?rev=cb8052aaf9c4bca3bea4a579667441cc3ba7537c#cb8052aaf9c4bca3bea4a579667441cc3ba7537c"
source = "git+https://github.com/hsivonen/chardetng?rev=3484d3e3ebdc8931493aa5df4d7ee9360a90e76b#3484d3e3ebdc8931493aa5df4d7ee9360a90e76b"
dependencies = [
"encoding_rs",
"memchr",

Просмотреть файл

@ -97,7 +97,7 @@ wasm-bindgen = { git = "https://github.com/kvark/dummy-web" }
web-sys = { git = "https://github.com/kvark/dummy-web" }
# Other overrides
chardetng = { git = "https://github.com/hsivonen/chardetng", rev="cb8052aaf9c4bca3bea4a579667441cc3ba7537c" }
chardetng = { git = "https://github.com/hsivonen/chardetng", rev="3484d3e3ebdc8931493aa5df4d7ee9360a90e76b" }
chardetng_c = { git = "https://github.com/hsivonen/chardetng_c", rev="ed8a4c6f900a90d4dbc1d64b856e61490a1c3570" }
libudev-sys = { path = "dom/webauthn/libudev-sys" }
packed_simd = { git = "https://github.com/hsivonen/packed_simd", rev="8b4bd7d8229660a749dbe419a57ea01df9de5453" }

Просмотреть файл

@ -1 +1 @@
{"files":{"CONTRIBUTING.md":"0e64fb3dd5a00e3fd528de6442de3f2ca851bd718c45cca0871aaf4eedac9ee1","COPYRIGHT":"2fd0d7e90bd241b79804de129c5b70089988f82a7bbb0fe580a55b67b2968928","Cargo.toml":"ab767659696eb10dbaab743b566910bd29fc8f8f6998d9580494397a8903bd34","LICENSE-APACHE":"cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30","LICENSE-MIT":"4ad721b5b6a3d39ca3e2202f403d897c4a1d42896486dd58963a81f8e64ef61d","README.md":"a6c97d91989aee4c8afed918340ce6287652cbdd6fed833e20f76367c7953db9","src/data.rs":"be48f1486ef9fc264f6cda2e10944b7dcf8ed0a904b53227340a1384803796c7","src/lib.rs":"8c632df34c983e90edc814233abb6a7e79ea76d56e6e8874f8d33379057edf63","src/tld.rs":"295c3c90c60c5bb6edd753b77c261eed10be2d431badda4e02168e740a0f2d7e"},"package":null}
{"files":{"CONTRIBUTING.md":"0e64fb3dd5a00e3fd528de6442de3f2ca851bd718c45cca0871aaf4eedac9ee1","COPYRIGHT":"2fd0d7e90bd241b79804de129c5b70089988f82a7bbb0fe580a55b67b2968928","Cargo.toml":"ab767659696eb10dbaab743b566910bd29fc8f8f6998d9580494397a8903bd34","LICENSE-APACHE":"cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30","LICENSE-MIT":"4ad721b5b6a3d39ca3e2202f403d897c4a1d42896486dd58963a81f8e64ef61d","README.md":"a6c97d91989aee4c8afed918340ce6287652cbdd6fed833e20f76367c7953db9","src/data.rs":"be48f1486ef9fc264f6cda2e10944b7dcf8ed0a904b53227340a1384803796c7","src/lib.rs":"16c7c78a56ec917e92db97263f4adddcf3749acaf7de88d088d1f5c86c278107","src/tld.rs":"295c3c90c60c5bb6edd753b77c261eed10be2d431badda4e02168e740a0f2d7e"},"package":null}

2
third_party/rust/chardetng/src/lib.rs поставляемый
Просмотреть файл

@ -593,7 +593,7 @@ impl LatinCandidate {
}
}
OrdinalState::Copyright => {
if b == b' ' {
if caseless_class == 0 {
score += COPYRIGHT_BONUS;
self.ordinal_state = OrdinalState::Space;
} else {