You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Get the content of the current draftletcontent=draft.content;// Define a regular expression to find all instances of lists formatted with [* ]letregex=/^\*\s+/gm;// Replace the matches with [- ]letupdatedContent=content.replace(regex,'- ');// Update the draft content with the new formatdraft.content=updatedContent;// Save the draftdraft.update();
The text was updated successfully, but these errors were encountered:
Markdown Lists Reformat (*⇨-) Action
Updated
08042024-192559
https://directory.getdrafts.com/a/2Tt
05C65F71-6E28-441A-A808-845F6C7FE2EF
Social
no idea why I hadn't before just made an Action for this but ... I have now. https://directory.getdrafts.com/a/2Tt
Meta
Description
Changes (replaces) any [* ]-formatted Markdown lists in the current Draft to hyphen format (- ).
Directory Description
Changes (replaces) any [* ]-formatted Markdown lists in the current Draft to hyphen format (- ) via regex (
/^\*\s+/gm
).Source
The text was updated successfully, but these errors were encountered: