Opened 7 years ago

Last modified 7 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 7 years ago by Karen Ananiev

Component: GeneralCore : Styles

comment:2 Changed 7 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 7 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 7 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 7 years ago by Tobiasz Cudnik

Keywords: Confirmed added; Pending removed

comment:6 Changed 7 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 – 2017 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy