Commit e76cff1
authored
fix: strip all accumulated tags in stripTagPrefix (#12)
Defensive fix: change TAG_PREFIX_REGEX from /^§\d+§\s*/ to /^(?:§\d+§\s*)+/ so stripTagPrefix removes all consecutive tag prefixes, not just the outermost one. In practice tags don't accumulate because prependTag always strips before prepending, but this makes the function robust against any future path that might double-tag content.
Thanks to @tomolom for the contribution.
Fixes #111 parent ca4d23f commit e76cff1
1 file changed
Lines changed: 1 addition & 1 deletion
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
0 commit comments