Skip to content

Commit

Permalink
Fix creation of standalone notes w/ custom placeholders
Browse files Browse the repository at this point in the history
Fixes #83
  • Loading branch information
argenos committed Apr 11, 2021
1 parent 77d6514 commit a7a8f3a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions content/mdnotes.js
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,9 @@ function get_placeholder_contents(template, fields) {
const re = /{{(\w+)}}/g;
let placeholders = template.match(re);

// In case a template doesn't have any placeholders
if (!placeholders) return;

// Loop through all the placeholders
for (const result of placeholders) {
let placeholder = result.substring(2, result.length - 2)
Expand Down

0 comments on commit a7a8f3a

Please sign in to comment.