SourceForge has been redesigned. Learn more.
Close

#934 0005998: 4 blank lines being injected into the page without notice, caused by  

open
nobody
None
5
2009-03-19
2009-03-19
Brian Hill
No

Incident:
4 blank lines are injected into the page (by who?) during 'save'.
They appear near the place a template is being used / near the dekiscript code.
2 above, 2 under the place where the template is.
But they DO NOT appear in the editor! You'll see them after save (or using my repro2)

Expected:
No blank lines before nor after.

DekiWiki Version:
Lyons preview 3

VM/Source Install:
on VM

How To Repro:
What I am trying to do:
I have a nice template A divided into sections (h1) which enlists a series of dekiscript invocation examples.

Like this:

wiki.tree(...)

web.link(page.name(...))

anotherwiki.call(withparam)

Then I made a handy template B which when used will import just 1 section of template A

Template B is like this:

{{ web.html('' .. wiki.page('Template:A', 'sectionname1') .. '') }}

The magic is that it will pull the content of the section 'sectionname1', which is a dekiscript istruction in truth, push in some so that if you import template B in a page, you'll see

wiki.tree(...)
You can save it smoothly and the produce the dynamic resuls you'll imagine.
So it's totally working and it's fun that deki allow me to do this things (I am thankful)

What goes wrong
When you import the template B, the page in edit mode is looking good, and you'll save soon.
But after you save, check the page that is shown, you'll find 2 blank lines before the text, and another 2 after, too.
Remember that in edit mode those lines where not visible!

Moreover, you can find something interesting if you use this repro2 procedure:

1.make sure the page is blank
2.import the template B
3. then switch to "source" without saving.
You'll find that is sorrounded by

title of the page

...rest of the page

Now you can see some of the infamous sequences (only 2 till now)
If you come back to "non-source", you'll now notice the blank row before the and the one after.

It's not finished yet.
If you switch again to 'source', the code is morphed (by who?) into

title of the page

...rest of the page

Now there are 2 blank rows before and 2 after.
You can return to "non-source" and NOW the editor is showing what the page will look like if you save.

4. No more "source-to-non-source" loop will trigger this behaviour

The bad thing is that they are always added when you save, even if you do not try to do my the "source-to-non-source" loop
Plus: Remember that they are added even if the editor is not showing them at the very start.

How to handle them?

apps

http://bugs.developer.mindtouch.com/view.php?id=5998

Discussion


Log in to post a comment.