Skip to content

Commit

Permalink
Remove some unneeded regexes
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Nov 15, 2024
1 parent c07be31 commit e95b184
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 11 deletions.
5 changes: 0 additions & 5 deletions packages/dir/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,6 @@ test('fixtures', async function (t) {
)
// Elements that GitHub drops entirely
.replace(/<video>.*?<\/video>/g, '')
// Elements that GitHub cleans (To do: implemment tagfilter somewhere?)
.replace(
/<(\/?(?:iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)>)/g,
'&#x3C;$1'
)
}

assert.equal(actual, expected)
Expand Down
2 changes: 1 addition & 1 deletion packages/emoji/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ test('fixtures', async function (t) {
)
// Elements that GitHub drops entirely
.replace(/<video>.*?<\/video>/g, '')
// Elements that GitHub cleans (To do: implemment tagfilter somewhere?)
// GH doesn’t transform gemoji -> emoji in things they “tagfilter”
.replace(
/(&#x3C;(?:iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)>)👍/g,
'$1:+1:'
Expand Down
5 changes: 0 additions & 5 deletions packages/notranslate/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,6 @@ test('fixtures', async function (t) {
)
// Elements that GitHub drops entirely
.replace(/<video>.*?<\/video>/g, '')
// Elements that GitHub cleans (To do: implemment tagfilter somewhere?)
.replace(
/<(\/?(?:iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)>)/g,
'&#x3C;$1'
)

expected = expected
// To do: add custom plugin.
Expand Down

0 comments on commit e95b184

Please sign in to comment.