Zim

verbatim block disappears

Bug #708752 reported by smu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zim
Fix Released
Critical
Unassigned

Bug Description

Steps to reproduce:

1. enter some text with multiple linebreaks
2. select the text block and format it as verbatim
3. Place the cursor some lines below the text block and enter 'test'
4. select the line and format is as verbatim
5. place the cursor at the beginning of 'test' and remove the linebreaks between 'test' and the text block until 'test' is placed at the end of the textblock, then press enter. Both verbatim text elements should now be part of a single verbatim block.
7. reload the page

- expected: nothing changes

- behavior: 'test' disappears

Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote : Re: [Bug 708752] [NEW] verbatim block disappears

Tried to reproduce, but no luck initially. Could you give more
detailed instructions ?

Revision history for this message
smu (smu) wrote :

Hi Jaap,

yes of course.

1. copy and paste the following code into a test page and reload the page:

'''
one
two
three
'''

''four''

2. place the cursor in front of "four" an press Backspace 3 times.

variant A:

Reload the page "four" disappears and the verbatim block is broken.
source code:

'''
one
two
three'''

variant B:

Press Enter and reload the page: "four" disappears.
source code

'''
one
two
three
'''

zim revision is 340, nothing unusual in the debug output.

best regards,
 stefan

On Thu, Jan 27, 2011 at 05:07:30PM -0000, Jaap Karssenberg wrote:
> Tried to reproduce, but no luck initially. Could you give more
> detailed instructions ?
>
> --
> You received this bug notification because you are a direct subscriber
> of the bug.
> https://bugs.launchpad.net/bugs/708752
>
> Title:
> verbatim block disappears
>
> Status in Zim desktop wiki:
> New
>
> Bug description:
> Steps to reproduce:
>
> 1. enter some text with multiple linebreaks
> 2. select the text block and format it as verbatim
> 3. Place the cursor some lines below the text block and enter 'test'
> 4. select the line and format is as verbatim
> 5. place the cursor at the beginning of 'test' and remove the linebreaks between 'test' and the text block until 'test' is placed at the end of the textblock, then press enter. Both verbatim text elements should now be part of a single verbatim block.
> 7. reload the page
>
> - expected: nothing changes
>
> - behavior: 'test' disappears
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/zim/+bug/708752/+subscribe
>

Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :

Confirmed, both in dev branch and in rev 0.49

Changed in zim:
status: New → Confirmed
importance: Undecided → Critical
Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :

Ok, turns out you found a roundabout way to apply two tags to the same text area (verbatim _and_ verbatim block inthis case, but will work with different tags as well). Results in disappearing text since verbatim block is supposed to be text only, so sub-tags are not printed to output.

Patch attached.

Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :

Will commit patch in rev341

Changed in zim:
status: Confirmed → Fix Committed
Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :

Fix released in zim 0.50

Changed in zim:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.