Skip to content

Commit

Permalink
fix(typography): dont create fractions in the middle of a string (ueb…
Browse files Browse the repository at this point in the history
  • Loading branch information
bdbch authored Feb 18, 2023
1 parent 6997bca commit 7ad54ea
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/extension-typography/src/typography.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export const registeredTrademark = textInputRule({
})

export const oneHalf = textInputRule({
find: /1\/2$/,
find: /(?:^|\s)(1\/2)$/,
replace: '½',
})

Expand Down Expand Up @@ -126,12 +126,12 @@ export const superscriptThree = textInputRule({
})

export const oneQuarter = textInputRule({
find: /1\/4$/,
find: /(?:^|\s)(1\/4)$/,
replace: '¼',
})

export const threeQuarters = textInputRule({
find: /3\/4$/,
find: /(?:^|\s)(3\/4)$/,
replace: '¾',
})

Expand Down

0 comments on commit 7ad54ea

Please sign in to comment.