Total newbie question:
Is there a way in Textpad to quickly format lists?
For example if I have
one
two
three
four
and want it to look like this
<ol>
<li>one</li>
<li>two</li>
<li>three</li>
<li>four</li>
</ol>
what would be the quickest way to do it?
newbie question - ul ol lists
Moderators: AmigoJack, bbadmin, helios, MudGuard
-
ben_josephs
- Posts: 2464
- Joined: Sun Mar 02, 2003 9:22 pm
You can create the list elements with
How do you know where the lists start and end? If they are always preceded and followed by a blank line, you can insert the opening list tags withFind what: ^+*$
Replace with: <li>\0</li>
[X] Regular expression
Replace All
and insert the closing list tags withFind what: ^\n<li>
Replace with: \n<ol>\n<li>
[X] Regular expression
Replace All
You might record a macro to do all this.Find what: </li>\n$
Replace with: </li>\n</ol>\n
[X] Regular expression
Replace All