Editorial Workflows

dl

public workflow

Install Workflow

This is a workflow for Editorial, a Markdown and plain text editor for iOS. To download it, you need to view this page on a device that has the app installed.

Description: Turns a list of terms and definitions (offset with tabs) into a fully formatted definition list, with tabs and double tabs.

<dl>
<dt>TERM</dt>
<dd>DEFINITION</dd>
<dt>TERM</dt>
<dd>DEFINITION</dd>
<dd>DEFINITION</dd>
</dl>

It will also handle nested ordered lists, but you have to make the ordered list yourself (I have a workflow for that too).

<dl>
<dt>TERM</dt>
<dd>DEFINITION</dd>
<dt>TERM</dt>
<dd><ol>
<li>NUMBERED DEF</li>
<li>NUMBERED DEF</li>
<li>NUMBERED DEF</li>
</ol></dd>
</dl>

Shared by: Phil Selman

Comments: Comment Feed (RSS)

There are no comments yet.

+ Add Comment

Workflow Preview
Extend Selection ?
Direction
  • Backward
  • Forward
  • Both
Unit
  • Start/End of Document
  • Start/End of Line
  • Number of Characters...
1
Set Variable ?
Variable Name
original
Value
Input
Get Tabs ?
Run the block if
Input
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Input
Generate Text ?
Text
original
Find / Replace ?
Find
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
Find / Replace ?
Find
^([\t]*).*$
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
$1
Set Variable ?
Variable Name
tabs
Value
Input
Generate Text ?
Text
original
Kill extra tabs ?
Find
^tabs
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
Find / Replace ?
Find
\s+$
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
…End If
Prefix / Suffix Lines ?
  • Prefix
  • Suffix
Text
<dt>
Prefix / Suffix Lines ?
  • Prefix
  • Suffix
Text
</dt>
Find / Replace ?
Find
<dt> (.*)</dt>$
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
<dd>$1</dd>
Find / Replace ?
Find
<d.> ?<ol></d.>
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
<dd><ol>
Find / Replace ?
Find
*<d.> *<li>(.*)</li></d.>
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
<li>$1</li>
Find / Replace ?
Find
<d.> *</ol></d.>
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
</ol></dd>
Generate Text ?
Text
<dl> Input </dl>
Add Tabs/Print ?
Run the block if
Input
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Input
Prefix / Suffix Lines ?
  • Prefix
  • Suffix
Text
tabs
Replace Selected Text ?
Replacement Text
Input
…End If