Skip to content

Commit

Permalink
chore: make sentence smooth (#11407)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
cunzaizhuyi and adamwathan committed Jun 11, 2023
1 parent ef2ebb2 commit 3be258c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/lib/generateRules.js
Original file line number Diff line number Diff line change
Expand Up @@ -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] === '/') {
Expand Down Expand Up @@ -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
}
Expand Down
6 changes: 3 additions & 3 deletions src/lib/offsets.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/

Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 3be258c

Please sign in to comment.