Convert bulleted list HTML code to Markdown in AppleScript?
0
votes
2
answers
291
views
I have this text to manipulate in AppleScript (e.g. the text of a variable):
Example note exported from Apple.
- Indent
- *Further* indent
- Even **further **indent. With a [link](https://duck.com) .
End note.
I'm converting it all to Markdown from HTML. I need to clean up this remaining bit of HTML which is the bullet list, so that the result is (with real tabs as indent space):
Example note exported from Apple.
- Indent
- *Further* indent
- Even **further **indent. With a [link](https://duck.com) .
End note.
It has to be able to cater to nested indenting to any 'n' number of levels, and with possibly some rich text inside the items such as this example. I prefer Markdown output to use hyphens and a tab for the indenting.
It also has to be containable inside the applescript - no external .py
files etc, and to not require homebrew
or a third party tool to be installed.
Asked by user163629
Oct 23, 2020, 05:40 PM
Last activity: Oct 25, 2020, 05:37 AM
Last activity: Oct 25, 2020, 05:37 AM