On Monday, January 27, 2020 at 6:57:46 AM UTC-5, Edward K. Ream wrote: > > On Monday, January 27, 2020 at 5:22:41 AM UTC-6, Edward K. Ream wrote: > > I see the same message as you reported. This should be enough to fix the >> problem. >> > > I think I can see how the following could occur:
> I now remember the general problem: it's difficult/impossible to use > section references in some situations, but without section references it's > not possible to put code in the proper place. > > In this case, the node > "toArray( element.querySelectorAll( 'video, audio' ) ).forEach function" > needs a section reference to properly place the child node, > "if( promise && typeof promise.catch === 'function' && el.controls === > false )" > and *its* child, > "el.addEventListener( 'play', function". > Changing the @auto node to an @file node and manually doing the sectioning is acceptable, but we probably want to yield an at auto import to give us a result that, upon being saved, still generates a diff equivalent file to the original. Disallowing some children is a good idea, as long as that noted in the doc's. > > In other words, the actual import machinery is probably working correctly. > The problem arising in the strategy used to allocate lines to nodes. This > is a tricky task. A rethink may be needed. One possibility would be to > disallow child nodes in some situations... > I suspect part of the problem maybe due to some of the lines that are tagged to be nodes, (and thus be the first line of the nodes body text), actually contains a leading fragment that should be the end of the prior node's body. I have an idea for a new type of section reference that allows for the first line of its body text to be joined into the line in which it occurs. i.e. say <|section|>., or <|section>> to indicate the side of the join. Tom -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to leo-editor+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/17dbc0ec-38a2-4870-bb23-6f1127884788%40googlegroups.com.