Skip to content

Commit

Permalink
fix: do multiline replacements
Browse files Browse the repository at this point in the history
  • Loading branch information
cossssmin committed Nov 16, 2024
1 parent 2977206 commit b1e3a1f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ export default (options = {}) => tree => {
const partWords = part.trim().split(/\s+/)
if (replace && partWords.length >= options.minWords) {
return options.createWidows
? part.replace(/ ([^ ]+)$/, ' $1')
: part.replace(/ ([^ ]+)$/, ' $1')
? part.replace(/ ([^ ]+)$/g, ' $1')
: part.replace(/ ([^ ]+)$/gm, ' $1')
}
return part
})
Expand Down

0 comments on commit b1e3a1f

Please sign in to comment.