Folks,
Process the text field a line at a time?
I realise this is in someways possible with datatiddlers, but I am interested in a filter or other method that would return each line of a text tiddler, delimited by new line or <br> as appears in the edit tiddler view.
A list filter to do this on a tiddlers text (or other) field would
- Without intervention, display the whole tiddler as it would be seen in edit mode.
- Wikifying each line would not always make sense as many WikiText items use more than one line
- Using the limit[5] would show the first 5 lines of a tiddler (un wikified)
- Each line can be subsequently filtered according to its content such as heading, comments and other string tests
- Is this string testing actually possible? perhaps with search operator on the resulting text, or listops?
- For example lines beginning with "!" could be filtered out and then wikifyed to provide a visual list of headings in this tiddler
- Any other text could be used to generate custom views eg
- <$list </$list <$set </$set <$vars </$vars etc... to show the code structure.
- A convention ".q" ".a" could be used to list questions and answers lines and get a css class to boot.
- Such a feature will allow for a rudimentary parsing and more sophisticated treatment of the text field content.
- Perhaps this could be used to support append/pre-pend to the text field allowing log and other tiddlers.
it must be happening in the CodeMirror plugin
If no solution exists I will raise a GitHub Issue.
Thank in advance
Tony