Yakov, On Tuesday, March 8, 2016 at 9:54:56 PM UTC+8, Yakov wrote: > > Hi Vincent, > > >> >>> >>> >>> >>> 1. Create a tiddler with a short paragraph (shorter than a line), an >>> empty line and another paragraph (line after 2 linebreaks). Go to the view >>> mode, click the first paragraph, go to the its end. Press right: what I get >>> is an *extra* block to the right from the first paragraph, then I press >>> right again, I get the empty line block (which is ok), then the second >>> paragraph. Interestingly enough, if I have a paragraph, a linebreak and a >>> list item (only one linebreak after the paragraph before the "*" symbol), I >>> get this "extra block", too; however, list items don't generate this "extra >>> block" (which can be seen if tiddler contains a list item and then a >>> paragraph). Another aspect: empty lines don't generate the "extra block". >>> >>> >>> The "extra block" corresponds to a BR element in the DOM tree. A >>> paragraph is usually followed by a BR, therefore you see that extra block. >>> An empty line is nothing but a BR, so that edit box for an empty line is >>> already that "extra box" itself, and that's why you don't get another extra >>> box again. Anything that's not followed by a BR does not give you this >>> extra box. >>> >>> I am still thinking of a good way to handle those BR's..... >>> >>> Well, I think a BR element should generate an edit block only if it is >>> followed by another BR, and if changes are to be applied the text should be >>> inserted after it [the first one]. >>> >> >> That is a good idea, but what confuses me now is the seemingly >> unpredictable appearance/disappearance of the BR's immediately before/after >> a block element... >> >> > I have to admit, I'm not sure what possible problem you're talking about > (well, at least I don't understand what are the possible causes). Or may be > you have tested this already? > > I meant the correspondence between a \n character and a BR element. At the beginning I thought that every BR corresponds to one \n, but did not see such a correspondence in the rendered tiddlers. That's why I thought it unpredictable.
These days I played a bit more and found that if "one block element is immediately following another", then that \n between the wiki text defining the two block elements is not rendered as a BR. All other cases \n's seem to have their corresponding BR's. I will find time to implement this finding in the codes and see how it works. I'll send you a new snapshot when I have one (may take a while though). Have fun! Vincent > Best regards, > Yakov. > -- 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/b0e884e4-1847-485d-8df6-5938cca83977%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.