Skip to content

Commit

Permalink
fix: punctuation missing end of word requirement
Browse files Browse the repository at this point in the history
  • Loading branch information
mtib committed Oct 18, 2024
1 parent deea5ab commit 1d88374
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/posts/text_manipulation.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
return word;
}

if (/.+[,.!?]/.test(word)) {
if (/.+[,.!?]$/.test(word)) {
return `\`${word.slice(0, -1)}\`${word.slice(-1)}`;
}

Expand Down

0 comments on commit 1d88374

Please sign in to comment.