Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save macdrifter/4738765 to your computer and use it in GitHub Desktop.
Save macdrifter/4738765 to your computer and use it in GitHub Desktop.
Editorial workflow to insert reference link
This gist contains a workflow for Editorial, an app for
writing plain text and markdown on iOS.
To import the workflow, copy the *entire* text of the gist,
then open Editorial and create a new workflow.
------------ BEGIN WORKFLOW ------------
{
"actions" : [
{
"class" : "WorkflowActionGetEditorText",
"parameters" : {
}
},
{
"class" : "WorkflowActionFilterLines",
"parameters" : {
"expression" : {
"text" : "^\\[([^^\\]]+)\\]:\\s+(.+)$",
"type" : "advancedText",
"tokenRanges" : {
}
},
"comparisonType" : 2
}
},
{
"class" : "WorkflowActionSelectFromList",
"parameters" : {
"list" : {
"text" : "?",
"type" : "advancedText",
"tokenRanges" : {
"{0, 1}" : "Input"
}
},
"allowMultipleSelection" : false
}
},
{
"class" : "WorkflowActionMatchRegularExpression",
"parameters" : {
"regex" : {
"text" : "^\\[([^^\\]]+)\\]",
"type" : "advancedText",
"tokenRanges" : {
}
},
"matchGroup" : ""
}
},
{
"class" : "WorkflowActionReplaceSelectedText",
"parameters" : {
"replacement" : {
"text" : "?",
"type" : "advancedText",
"tokenRanges" : {
"{0, 1}" : "Input"
}
}
}
}
],
"name" : "Insert Link Mark"
}
------------- END WORKFLOW -------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment