зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1465020 - Do not trim whitespace from variable font axis tag names. r=gl
MozReview-Commit-ID: 6pdCAPhJHze --HG-- extra : rebase_source : b3fa41e4e71b9a161932455db3341d019568fa1c
This commit is contained in:
Родитель
a36070ee4a
Коммит
8a3c0d21c4
|
@ -67,9 +67,12 @@ module.exports = {
|
|||
.reduce((acc, pair) => {
|
||||
// Tags are always in quotes. Split by quote and filter excessive whitespace.
|
||||
pair = pair.split(/["']/).filter(part => part.trim() !== "");
|
||||
const tag = pair[0].trim();
|
||||
const tag = pair[0];
|
||||
const value = pair[1].trim();
|
||||
acc[tag] = value;
|
||||
// Axis tags shorter or longer than 4 characters are invalid. Whitespace is valid.
|
||||
if (tag.length === 4) {
|
||||
acc[tag] = value;
|
||||
}
|
||||
return acc;
|
||||
}, {});
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче