Skip to content

Commit

Permalink
Merge pull request #177 from akosbalasko/fix-tags-and-title-multimeta
Browse files Browse the repository at this point in the history
  • Loading branch information
akosbalasko authored Jan 11, 2021
2 parents 0fdc6bc + 4219664 commit 0b296ac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "yarle-evernote-to-md",
"version": "3.8.0",
"version": "3.8.1",
"description": "Yet Another Rope Ladder from Evernote",
"keywords": [
"evernote",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@ export const applyTemplateOnBlock = ({
}: TemplateBlockSettings): string => {
if (value && check()) {
return template
.replace(startBlockPlaceholder, '')
.replace(endBlockPlaceholder, '')
.replace(valuePlaceholder, value);
.replace(new RegExp(`${startBlockPlaceholder}`,'g'), '')
.replace(new RegExp(`${endBlockPlaceholder}`,'g'), '')
.replace(new RegExp(`${valuePlaceholder}`,'g'), value);

}

return template.replace(
new RegExp(
`${startBlockPlaceholder}${M.MATCH_ALL}${endBlockPlaceholder}`,
`${startBlockPlaceholder}([\\D\\d]).*?(?=${endBlockPlaceholder})${endBlockPlaceholder}`,
'g',
),
'',
Expand Down

0 comments on commit 0b296ac

Please sign in to comment.