Hi community tiddlers :)

I have a macro that splits text into single characters

I'm using the diff-match-patch widget to get the text with its new-lines 
and tabs as characters

The macro allows me to replace characters or to get the index of a given 
search expression or to find matches by prefix and suffix

After the processing I have a new string that contains the new-line and tab 
characters which I want to replace with new-lines and tabs

I made a json tiddler like

{
    "\u21A9": "\r\n",
    "↩": "\r\n"
}

this lets me replace the characters the diff-match-patch widget uses as 
replacements for new-line with newlines recognized by the editor


The problem is, that "\r\n" doesn't do it correctly, neither does "\n" alone

I use the action-setfield widget to set the text of a test-tiddler to the 
new genereated text. It contains the correct text and all the newlines and 
tabs, but the newlines aren't rendered the same way as in the original 
tiddler

Two consecutive newlines for example should render a new line, but it 
doesn't here. It does work if I edit the text and hit the backspace key at 
the start of such a generated newline. That deletes something like an 
"invisible" character and afterwards the rendering is correct.


My question  is, if there's a way to insert such a new-line character so 
that the rendering results right in the end


I hope someone can help,
all the best, Simon

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/c38c2a9c-64fa-4aaf-9a88-a97c0b82c5bc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to