Opened 14 years ago

Last modified 14 years ago

#5939 confirmed Bug

Attributes of PRE blocks are lost after merging in styles plugin

Reported by: Karen Ananiev Owned by:
Priority: Normal Milestone:
Component: Core : Styles Version: 3.3.1
Keywords: Cc:

Description

Styles plugin loses the attributes of PRE blocks in mergePre and toPre functions.

Change History (6)

comment:1 Changed 14 years ago by Karen Ananiev

Component: GeneralCore : Styles

comment:2 Changed 14 years ago by Tobiasz Cudnik

Keywords: Pending added

Could you please provide us some steps to easier reproduce this issue ? Thank you.

comment:3 Changed 14 years ago by Karen Ananiev

Sure. Use the following code:

<pre class="code">
foo</pre>
<p>
	bar</p>

Move cursor to paragraph and select Formatted format. Go to source mode - note that now you have one pre block without any attributes.

comment:4 Changed 14 years ago by Tobiasz Cudnik

Thank you, i can definitely confirm it now.

How do you think the merging should behave when there is a CSS class on more then one element ? Should all classes be merged into one new element ?

comment:5 Changed 14 years ago by Tobiasz Cudnik

Keywords: Confirmed added; Pending removed

comment:6 Changed 14 years ago by Karen Ananiev

Generally I don't like this functionality because I have no easy way to create two consecutive pre blocks but if it is really necessary I think that just keeping attributes of pre block should be enough. So if you have the following code:

<pre class="code">
foo</pre>
<p class="text">bar</p>

you should get something like:

<pre class="code">
foo
bar</pre>
Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy