Skip to content

Commit

Permalink
Bug Fix: signavio#634 (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeHedman committed Feb 27, 2023
2 parents ff277e9 + ee06392 commit f3a787d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/utils/iterateMentionsMarkup.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,13 @@ const iterateMentionsMarkup = (

let accOffset = 2 // first is whole match, second is the for the capturing group of first regexp component
const captureGroupOffsets = config.map(({ markup }) => {
const result = accOffset
// + 1 is for the capturing group we add around each regexp component in combineRegExps
accOffset += countPlaceholders(markup) + 1
let result
if (markup !== undefined) {
result = accOffset
accOffset += countPlaceholders(markup) + 1
return result
}
return result
})

Expand Down

0 comments on commit f3a787d

Please sign in to comment.