chore: make sentence smooth (#11407)

* chore: make sentence smooth

* chore: everything typo

* chore: its

* feat: e.g.

* chore: a => an; remove repeated `to`

* Update offsets.js

* Update generateRules.js

---------

Co-authored-by: Adam Wathan <adam.wathan@gmail.com>
This commit is contained in:
cunzaizhuyi 2023-06-11 23:06:03 +08:00 • committed by GitHub
parent ef2ebb28d5
commit 3be258c218
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View file

@ -45,7 +45,7 @@ function* candidatePermutations(candidate) {
let bracketIdx = candidate.indexOf('[')
// If character before `[` isn't a dash or a slash, this isn't a dynamic class
// eg. string[]
// e.g. string[]
if (candidate[bracketIdx - 1] === '-') {
dashIdx = bracketIdx - 1
} else if (candidate[bracketIdx - 1] === '/') {
@ -455,9 +455,9 @@ function isParsableNode(node) {
}
function isParsableCssValue(property, value) {
// We don't want to to treat [https://example.com] as a custom property
// We don't want to treat [https://example.com] as a custom property
// Even though, according to the CSS grammar, it's a totally valid CSS declaration
// So we short-circuit here by checking if the custom property looks like a url
// So we short-circuit here by checking if the custom property looks like a URL
if (looksLikeUri(`${property}:${value}`)) {
return false
}

View file

@ -23,7 +23,7 @@ import { remapBitfield } from './remap-bitfield.js'
* @property {bigint} arbitrary 0n if false, 1n if true
* @property {bigint} variants Dynamic size. 1 bit per registered variant. 0n means no variants
* @property {bigint} parallelIndex Rule index for the parallel variant. 0 if not applicable.
* @property {bigint} index Index of the rule / utility in it's given *parent* layer. Monotonically increasing.
* @property {bigint} index Index of the rule / utility in its given *parent* layer. Monotonically increasing.
* @property {VariantOption[]} options Some information on how we can sort arbitrary variants
*/
@ -302,7 +302,7 @@ export class Offsets {
let mapping = this.recalculateVariantOffsets()
// No arbitrary variants? Nothing to do.
// Everyhing already in order? Nothing to do.
// Everything already in order? Nothing to do.
if (mapping.length === 0) {
return list
}
@ -354,7 +354,7 @@ function max(nums) {
* Using `.sort()` without a custom compare function is faster
* But you can only use that if you're sorting an array of
* only strings. If you're sorting strings inside objects
* or arrays, you need must use a custom compare function.
* or arrays, you need to use a custom compare function.
*
* @param {string} a
* @param {string} b