[tw5] Re: How to correctly insert new-line characters through a setfield widget

2018-12-13 Thread PMario
On Thursday, December 13, 2018 at 2:09:15 PM UTC+1, BurningTreeC wrote: ... I think I don't want such fields, I just want to get those newline >> characters correctly into my testtiddler. I believe the problem here is >> that I'm using diff-match for visualizing that does some processing I don't

[tw5] Re: How to correctly insert new-line characters through a setfield widget

2018-12-13 Thread BurningTreeC
> > On Thursday, December 13, 2018 at 1:41:48 PM UTC+1, BurningTreeC wrote: >> ... >> >>> I want to see how far I can go with wikitext only :P >>> >> >> I see. ... forgive my ignorance: IMO That's completely inefficient. ... >> Some string manipulations, like find and replace are 1 liners in >>

[tw5] Re: How to correctly insert new-line characters through a setfield widget

2018-12-13 Thread BurningTreeC
> On Thursday, December 13, 2018 at 1:41:48 PM UTC+1, BurningTreeC wrote: > ... > >> I want to see how far I can go with wikitext only :P >> > > I see. ... forgive my ignorance: IMO That's completely inefficient. ... > Some string manipulations, like find and replace are 1 liners in > javascrip

[tw5] Re: How to correctly insert new-line characters through a setfield widget

2018-12-13 Thread PMario
On Thursday, December 13, 2018 at 1:41:48 PM UTC+1, BurningTreeC wrote: ... > I want to see how far I can go with wikitext only :P > I see. ... forgive my ignorance: IMO That's completely inefficient. ... Some string manipulations, like find and replace are 1 liners in javascript. So if you w

[tw5] Re: How to correctly insert new-line characters through a setfield widget

2018-12-13 Thread BurningTreeC
To explain what the (complicated, yes that's true) macros do: they split the input string into single characters prefixed with an index from 1 to text-length, so I have an array: 1h 2e 3l 4l 5o 6%20 7{ 8{ 9$ 10: 11/ and so on they are numbered so that each list-item is unique depending w

[tw5] Re: How to correctly insert new-line characters through a setfield widget

2018-12-13 Thread PMario
On Thursday, December 13, 2018 at 1:19:52 PM UTC+1, BurningTreeC wrote: > > > I haven't looked into the capabilities of the diff-match-patch widget, > though - can it do this out of the box? > I was thinking about the low-level box: https://github.com/google/diff-match-patch/wiki/API -m -- Yo

[tw5] Re: How to correctly insert new-line characters through a setfield widget

2018-12-13 Thread BurningTreeC
> Hi BTC, > > I'm not really sure, what you try to achieve here. ... I do have a guess. > ... And I think "you'r doing it wrong". > > I'm using the diff-match-patch widget to get the text with its new-lines >> and tabs as characters >> > > IMO diff-match-patch mechanism can do everything you d

[tw5] Re: How to correctly insert new-line characters through a setfield widget

2018-12-13 Thread PMario
Hi BTC, I'm not really sure, what you try to achieve here. ... I do have a guess. ... And I think "you'r doing it wrong". I'm using the diff-match-patch widget to get the text with its new-lines > and tabs as characters > IMO diff-match-patch mechanism can do everything you did with complicat

[tw5] Re: How to correctly insert new-line characters through a setfield widget

2018-12-13 Thread BurningTreeC
> Hi > > TW uses "\n" and removes "\r" for every OS. It even makes a big difference > in file size. > > -m > Thanks Mario, I've changed that back. I had experimented with all kinds of combinations, starting with "\n" only But even so it inserts newline characters, but the resulting tiddler l

[tw5] Re: How to correctly insert new-line characters through a setfield widget

2018-12-13 Thread PMario
Hi TW uses "\n" and removes "\r" for every OS. It even makes a big difference in file size. -m -- 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+unsub

[tw5] Re: How to correctly insert new-line characters through a setfield widget

2018-12-12 Thread BurningTreeC
To test this, try the following on tiddlywiki.com for example: put this in some tiddler: <$button><$action-setfield $tiddler="test" text={{{ [[jsontiddler]getindex[test]] }}}/>Ok create the tiddler "jsontiddler" with its type set to "application/json" and put the following inside: { "test":