Skip to content

Commit

Permalink
Regex rollback;
Browse files Browse the repository at this point in the history
  • Loading branch information
dabalroman committed Jul 29, 2024
1 parent b2087fb commit 0ea6ae4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/helper/AutoEventNoteCreator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ export const checkForEventNotes = async (plugin: GoogleCalendarPlugin): Promise<
if (plugin.settings.autoCreateEventNotesMarker === "") {
await createNoteFromEvent(events[i], plugin.settings.defaultFolder, plugin.settings.defaultTemplate, true)
} else {
const regex = new RegExp(`:([^:]*)?-?${plugin.settings.autoCreateEventNotesMarker}-?([^:]*)?:`)

const regex = new RegExp(`:([^:]*-)?${plugin.settings.autoCreateEventNotesMarker}-?([^:]*)?:`)

//regex will check for text and extract a template name if it exists
const match = events[i].description?.match(regex) ?? [];
Expand Down

0 comments on commit 0ea6ae4

Please sign in to comment.