How can I "bulk paste" a clipboard string of multi-line text into a readable ordered list?
- by gunshor
How can I "bulk paste" a clipboard string of multi-line text into a readable ordered list?
I'm trying to demonstrate how to turn any string of multi-line text into an ordered list.
The script (preferably JS) needs to respect:
- carriage returns at the end of a line, to mean "that line ends here"
- indentations at the beginning of a line, to mean "this is part of the item above it"
- dashes at the beginning of a line, to mean "this is a task, and the line above it is its project"