Skip to content

Commit

Permalink
Actually it turns out that ie11 list might contain multiple paragraph…
Browse files Browse the repository at this point in the history
…s, see 10784line missing.docx. Another set of fixtures updated.
  • Loading branch information
mlewand committed Jan 27, 2017
1 parent 48a5ea2 commit 13aee25
Show file tree
Hide file tree
Showing 7 changed files with 2,897 additions and 34 deletions.
20 changes: 17 additions & 3 deletions plugins/pastefromword/filter/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,23 @@
List.convertToFakeListItem( editor, element );

// IE pastes nested paragraphs in list items, which is different from other browsers. (#16826)
if ( element.children.length === 1 && element.children[ 0 ].name === 'p' ) {
element.children[ 0 ].replaceWithChildren();
}
// There's a possibility that list item will contain multiple paragraphs, in that case we want
// to split them with BR.
tools.array.reduce( element.children, function( paragraphsReplaced, node ) {
if ( node.name === 'p' ) {
// If there were already paragraphs replaced, put a br before this paragraph, so that
// it's inline children are displayed in a next line.
if ( paragraphsReplaced > 0 ) {
var br = new CKEDITOR.htmlParser.element( 'br' );
br.insertBefore( node );
}

node.replaceWithChildren();
paragraphsReplaced += 1;
}

return paragraphsReplaced;
}, 0 );
} else {
// In IE list level information is stored in <p> elements inside <li> elements.
var container = element.getAscendant( function( element ) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,103 @@
<p style="margin-left:0in; margin-right:0in; text-align:left"><strong><u><span style="font-family:simsun"><span style="color:#000000"><span style="font-size:medium">销售情况</span></span></span></u></strong></p><p style="margin-left:0in; margin-right:0in"><span style="font-family:simsun"><span style="font-size:medium"><span style="color:#000000">ad发顺丰发顺丰发顺丰发顺丰发顺丰发顺丰发顺丰发顺丰发顺丰发顺丰发顺丰</span></span></span></p><ol><li><p><span style="font-weight:normal"><span style="tab-stops:list 21.0pt"><span style="font-family:simsun">发顺丰发顺丰发顺丰发顺丰发顺丰发顺丰发顺丰发顺丰发顺丰,</span></span></span></p></li><li><p><span style="font-size:12pt"><span style="color:rgb(0, 0, 0)"><span style="font-family:simsun"><span style="font-weight:normal"><span style="tab-stops:list 21.0pt"><span style="font-family:simsun">发顺丰发顺丰发顺丰发顺丰发顺丰发顺</span></span></span></span></span></span></p></li><li><p><span style="font-size:12pt"><span style="color:rgb(0, 0, 0)"><span style="font-family:simsun"><span style="font-weight:normal"><span style="tab-stops:list 21.0pt"><span style="font-family:simsun">发顺丰发顺丰发顺丰发顺丰发顺丰发顺还没立项。</span></span></span></span></span></span></p><p><br /></p><p><span style="font-size:12pt"><span style="color:rgb(0, 0, 0)"><span style="font-family:simsun"><span style="font-weight:normal"><span style="font-family:simsun">销售预计:</span></span></span></span></span></p><p><span style="font-size:12pt"><span style="color:rgb(0, 0, 0)"><span style="font-family:simsun"><span style="font-weight:normal"><span style="font-family:simsun">今年年底有</span><span style="font-family:simsun">600万-700万的销售</span></span></span></span></span></p><p><span style="font-size:12pt"><span style="color:rgb(0, 0, 0)"><span style="font-family:simsun"><span style="font-weight:normal"><span style="font-family:simsun">2的发生地方地方撒地方地方阿飞为1发生地方万的地方 地方撒地 地方第三方润。</span></span></span></span></span></p><p><br /></p><p><span style="font-size:12pt"><span style="color:rgb(0, 0, 0)"><span style="font-family:simsun"><span style="font-weight:normal"><span style="font-family:simsun">打算:一般俄文</span><span style="font-family:simsun">60%、10%(10%额放入的第一笔付为账,第二俄文%的款项看工程的长短,根据工程斯蒂芬30%、3额未遂犯项目工程为地方撒地方sad是否的萨芬撒佛挡杀佛第三方年。</span></span></span></span></span></p></li></ol><p style="margin-left:0in; margin-right:0in"><br /></p>
<p style="margin-left:0in; margin-right:0in; text-align:left">
<strong>
<u>
<span style="font-family:simsun">
<span style="color:#000000">
<span style="font-size:medium">销售情况</span>
</span>
</span>
</u>
</strong>
</p>
<p style="margin-left:0in; margin-right:0in">
<span style="font-family:simsun">
<span style="font-size:medium">
<span style="color:#000000">
ad 发顺丰发顺丰发顺丰发顺丰发顺丰发顺丰发顺丰发顺丰发顺丰发顺丰发顺丰
</span>
</span>
</span>
</p>
<ol>
<li>
<span style="font-weight:normal">
<span style="tab-stops:list 21.0pt">
<span style="font-family:simsun">发顺丰发顺丰发顺丰发顺丰发顺丰发顺丰发顺丰发顺丰发顺丰,</span>
</span>
</span>
</li>
<li>
<span style="font-size:12pt">
<span style="color:rgb(0, 0, 0)">
<span style="font-family:simsun">
<span style="font-weight:normal">
<span style="tab-stops:list 21.0pt">
<span style="font-family:simsun">发顺丰发顺丰发顺丰发顺丰发顺丰发顺</span>
</span>
</span>
</span>
</span>
</span>
</li>
<li>
<span style="font-size:12pt">
<span style="color:rgb(0, 0, 0)">
<span style="font-family:simsun">
<span style="font-weight:normal">
<span style="tab-stops:list 21.0pt">
<span style="font-family:simsun">发顺丰发顺丰发顺丰发顺丰发顺丰发顺还没立项。</span>
</span>
</span>
</span>
</span>
</span>
<br />
<br />
<span style="font-size:12pt">
<span style="color:rgb(0, 0, 0)">
<span style="font-family:simsun">
<span style="font-weight:normal">
<span style="font-family:simsun">销售预计:</span>
</span>
</span>
</span>
</span>
<br />
<span style="font-size:12pt">
<span style="color:rgb(0, 0, 0)">
<span style="font-family:simsun">
<span style="font-weight:normal">
<span style="font-family:simsun">今年年底有</span>
<span style="font-family:simsun">600 万-700 万的销售
</span>
</span>
</span>
</span>
</span>
<br />
<span style="font-size:12pt">
<span style="color:rgb(0, 0, 0)">
<span style="font-family:simsun">
<span style="font-weight:normal">
<span style="font-family:simsun">2 的发生地方地方撒地方地方阿飞为1 发生地方万的地方 地方撒地 地方第三方润。 </span>
</span>
</span>
</span>
</span>
<br />
<br />
<span style="font-size:12pt">
<span style="color:rgb(0, 0, 0)">
<span style="font-family:simsun">
<span style="font-weight:normal">
<span style="font-family:simsun">打算:一般俄文</span>
<span style="font-family:simsun">60% 、10% (10% 额放入的第一笔付为账,第二俄文% 的款项看工程的长短,根据工程斯蒂芬30% 、3 额未遂犯项目工程为地方撒地方sad 是否的萨芬撒佛挡杀佛第三方年。 </span>
</span>
</span>
</span>
</span>
</li>
</ol>
<p style="margin-left:0in; margin-right:0in">
<br />
</p>
Original file line number Diff line number Diff line change
@@ -1,27 +1,84 @@
<font color="#000000" face="Times New Roman" size="3">

</font><p align="left" style="margin: 0in 0in 0pt; text-align: left;"><b style="mso-bidi-font-weight: normal;"><u><span lang="ZH-CN" style="font-family: SimSun; mso-bidi-font-family: Arial;"><font color="#000000" size="3">销售情况</font></span></u></b></p><font color="#000000" face="Times New Roman" size="3">

</font><p style="margin: 0in 0in 0pt;"><span style="font-family: SimSun; mso-bidi-font-family: Arial;"><font size="3"><font color="#000000">Ad<span lang="ZH-CN">发顺丰发顺丰发顺丰发顺丰发顺丰发顺丰发顺丰发顺丰发顺丰发顺丰发顺丰</span></font></font></span></p><font color="#000000" face="Times New Roman" size="3">

</font><ol style="list-style-type: decimal; direction: ltr;"><li style="font-weight: normal;"><p style="font-weight: normal; margin-top: 0in; margin-bottom: 0pt; mso-char-indent-count: 0; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt;"><span lang="ZH-CN" style="font-family: SimSun; mso-bidi-font-family: Arial;">发顺丰发顺丰发顺丰发顺丰发顺丰发顺丰发顺丰发顺丰发顺丰,</span></p></li><li style="color: rgb(0, 0, 0); font-family: SimSun; font-size: 12pt; font-weight: normal;"><p style='color: rgb(0, 0, 0); font-family: "Times New Roman",serif; font-size: 12pt; font-weight: normal; margin-top: 0in; margin-bottom: 0pt; mso-char-indent-count: 0; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt;'><span lang="ZH-CN" style="font-family: SimSun; mso-bidi-font-family: Arial;">发顺丰发顺丰发顺丰发顺丰发顺丰发顺</span></p></li><li style="color: rgb(0, 0, 0); font-family: SimSun; font-size: 12pt; font-weight: normal;"><p style='color: rgb(0, 0, 0); font-family: "Times New Roman",serif; font-size: 12pt; font-weight: normal; margin-top: 0in; margin-bottom: 0pt; mso-char-indent-count: 0; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt;'><span lang="ZH-CN" style="font-family: SimSun; mso-bidi-font-family: Arial;">发顺丰发顺丰发顺丰发顺丰发顺丰发顺还没立项。</span></p><p style='color: rgb(0, 0, 0); font-family: "Times New Roman",serif; font-size: 12pt; font-weight: normal; margin-top: 0in; margin-bottom: 0pt; mso-char-indent-count: 0;'><span style="font-family: SimSun; mso-bidi-font-family: Arial;">&nbsp;</span></p><p style='color: rgb(0, 0, 0); font-family: "Times New Roman",serif; font-size: 12pt; font-weight: normal; margin-top: 0in; margin-bottom: 0pt; mso-char-indent-count: 0;'><span lang="ZH-CN" style="font-family: SimSun; mso-bidi-font-family: Arial;">销售预计:</span></p><p style='color: rgb(0, 0, 0); font-family: "Times New Roman",serif; font-size: 12pt; font-weight: normal; margin-top: 0in; margin-bottom: 0pt; mso-char-indent-count: 0;'><span lang="ZH-CN" style="font-family: SimSun; mso-bidi-font-family: Arial;">今年年底有</span><span style="font-family: SimSun; mso-bidi-font-family: Arial;">600<span lang="ZH-CN"></span>-700<span lang="ZH-CN">万的销售</span></span></p><p style='color: rgb(0, 0, 0); font-family: "Times New Roman",serif; font-size: 12pt; font-weight: normal; margin-top: 0in; margin-bottom: 0pt; mso-char-indent-count: 0;'><span style="font-family: SimSun; mso-bidi-font-family: Arial;">2<span lang="ZH-CN">的发生地方地方撒地方地方阿飞为</span>1<span lang="ZH-CN">发生地方万的地方</span><span style="mso-spacerun: yes;">&nbsp; </span><span lang="ZH-CN">地方撒地 地方第三方润。</span></span></p><p style='color: rgb(0, 0, 0); font-family: "Times New Roman",serif; font-size: 12pt; font-weight: normal; margin-top: 0in; margin-bottom: 0pt; mso-char-indent-count: 0;'><span style="font-family: SimSun; mso-bidi-font-family: Arial;">&nbsp;</span></p><p style='color: rgb(0, 0, 0); font-family: "Times New Roman",serif; font-size: 12pt; font-weight: normal; margin-top: 0in; margin-bottom: 0pt; mso-char-indent-count: 0;'><span lang="ZH-CN" style="font-family: SimSun; mso-bidi-font-family: Arial;">打算:一般俄文</span><span style="font-family: SimSun; mso-bidi-font-family: Arial;">60%<span lang="ZH-CN"></span>10%<span lang="ZH-CN"></span>10%<span lang="ZH-CN">额放入的第一笔付为账,第二俄文</span>%<span lang="ZH-CN">的款项看工程的长短,根据工程斯蒂芬</span>30%<span lang="ZH-CN"></span>3<span lang="ZH-CN">额未遂犯项目工程为地方撒地方</span>sad<span lang="ZH-CN">是否的萨芬撒佛挡杀佛第三方年。</span></span></p></li></ol><font color="#000000" face="Times New Roman" size="3">

















</font><p style="margin: 0in 0in 0pt;"><font color="#000000" face="Times New Roman" size="3">&nbsp;</font></p><font color="#000000" face="Times New Roman" size="3">

</font>
</font>
<p align="left" style="margin: 0in 0in 0pt; text-align: left;">
<b style="mso-bidi-font-weight: normal;">
<u>
<span lang="ZH-CN" style="font-family: SimSun; mso-bidi-font-family: Arial;">
<font color="#000000" size="3">销售情况</font>
</span>
</u>
</b>
</p>
<font color="#000000" face="Times New Roman" size="3">
</font>
<p style="margin: 0in 0in 0pt;">
<span style="font-family: SimSun; mso-bidi-font-family: Arial;">
<font size="3">
<font color="#000000">Ad
<span lang="ZH-CN">发顺丰发顺丰发顺丰发顺丰发顺丰发顺丰发顺丰发顺丰发顺丰发顺丰发顺丰</span>
</font>
</font>
</span>
</p>
<font color="#000000" face="Times New Roman" size="3">
</font>
<ol style="list-style-type: decimal; direction: ltr;">
<li style="font-weight: normal;">
<p style="font-weight: normal; margin-top: 0in; margin-bottom: 0pt; mso-char-indent-count: 0; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt;">
<span lang="ZH-CN" style="font-family: SimSun; mso-bidi-font-family: Arial;">发顺丰发顺丰发顺丰发顺丰发顺丰发顺丰发顺丰发顺丰发顺丰,</span>
</p>
</li>
<li style="color: rgb(0, 0, 0); font-family: SimSun; font-size: 12pt; font-weight: normal;">
<p style='color: rgb(0, 0, 0); font-family: "Times New Roman",serif; font-size: 12pt; font-weight: normal; margin-top: 0in; margin-bottom: 0pt; mso-char-indent-count: 0; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt;'>
<span lang="ZH-CN" style="font-family: SimSun; mso-bidi-font-family: Arial;">发顺丰发顺丰发顺丰发顺丰发顺丰发顺</span>
</p>
</li>
<li style="color: rgb(0, 0, 0); font-family: SimSun; font-size: 12pt; font-weight: normal;">
<p style='color: rgb(0, 0, 0); font-family: "Times New Roman",serif; font-size: 12pt; font-weight: normal; margin-top: 0in; margin-bottom: 0pt; mso-char-indent-count: 0; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt;'>
<span lang="ZH-CN" style="font-family: SimSun; mso-bidi-font-family: Arial;">发顺丰发顺丰发顺丰发顺丰发顺丰发顺还没立项。</span>
</p>
<p style='color: rgb(0, 0, 0); font-family: "Times New Roman",serif; font-size: 12pt; font-weight: normal; margin-top: 0in; margin-bottom: 0pt; mso-char-indent-count: 0;'>
<span style="font-family: SimSun; mso-bidi-font-family: Arial;">&nbsp;</span>
</p>
<p style='color: rgb(0, 0, 0); font-family: "Times New Roman",serif; font-size: 12pt; font-weight: normal; margin-top: 0in; margin-bottom: 0pt; mso-char-indent-count: 0;'>
<span lang="ZH-CN" style="font-family: SimSun; mso-bidi-font-family: Arial;">销售预计:</span>
</p>
<p style='color: rgb(0, 0, 0); font-family: "Times New Roman",serif; font-size: 12pt; font-weight: normal; margin-top: 0in; margin-bottom: 0pt; mso-char-indent-count: 0;'>
<span lang="ZH-CN" style="font-family: SimSun; mso-bidi-font-family: Arial;">今年年底有</span>
<span style="font-family: SimSun; mso-bidi-font-family: Arial;">600
<span lang="ZH-CN"></span>-700
<span lang="ZH-CN">万的销售</span>
</span>
</p>
<p style='color: rgb(0, 0, 0); font-family: "Times New Roman",serif; font-size: 12pt; font-weight: normal; margin-top: 0in; margin-bottom: 0pt; mso-char-indent-count: 0;'>
<span style="font-family: SimSun; mso-bidi-font-family: Arial;">2
<span lang="ZH-CN">的发生地方地方撒地方地方阿飞为</span>1
<span lang="ZH-CN">发生地方万的地方</span>
<span style="mso-spacerun: yes;">&nbsp; </span>
<span lang="ZH-CN">地方撒地 地方第三方润。</span>
</span>
</p>
<p style='color: rgb(0, 0, 0); font-family: "Times New Roman",serif; font-size: 12pt; font-weight: normal; margin-top: 0in; margin-bottom: 0pt; mso-char-indent-count: 0;'>
<span style="font-family: SimSun; mso-bidi-font-family: Arial;">&nbsp;</span>
</p>
<p style='color: rgb(0, 0, 0); font-family: "Times New Roman",serif; font-size: 12pt; font-weight: normal; margin-top: 0in; margin-bottom: 0pt; mso-char-indent-count: 0;'>
<span lang="ZH-CN" style="font-family: SimSun; mso-bidi-font-family: Arial;">打算:一般俄文</span>
<span style="font-family: SimSun; mso-bidi-font-family: Arial;">60%
<span lang="ZH-CN"></span>10%
<span lang="ZH-CN"></span>10%
<span lang="ZH-CN">额放入的第一笔付为账,第二俄文</span>%
<span lang="ZH-CN">的款项看工程的长短,根据工程斯蒂芬</span>30%
<span lang="ZH-CN"></span>3
<span lang="ZH-CN">额未遂犯项目工程为地方撒地方</span>sad
<span lang="ZH-CN">是否的萨芬撒佛挡杀佛第三方年。</span>
</span>
</p>
</li>
</ol>
<font color="#000000" face="Times New Roman" size="3">
</font>
<p style="margin: 0in 0in 0pt;">
<font color="#000000" face="Times New Roman" size="3">&nbsp;</font>
</p>
<font color="#000000" face="Times New Roman" size="3">
</font>
Original file line number Diff line number Diff line change
@@ -1 +1,41 @@
<ul><li><p><span style="font-weight:normal"><strong><span style="font-size:10pt"><span style="font-family:&quot;arial&quot;,sans-serif">hello</span></span></strong></span></p></li><li><p><span style="font-size:10pt"><span style="color:rgb(0, 0, 0)"><span style="font-family:&quot;arial&quot;,sans-serif"><span style="font-weight:normal"><strong><span style="font-size:10pt"><span style="font-family:&quot;arial&quot;,sans-serif">world</span></span></strong></span></span></span></span></p></li><li><p><span style="font-size:10pt"><span style="color:rgb(0, 0, 0)"><span style="font-family:&quot;arial&quot;,sans-serif"><span style="font-weight:normal"><strong><span style="font-size:10pt"><span style="font-family:&quot;arial&quot;,sans-serif">abc</span></span></strong></span></span></span></span></p></li></ul>
<ul>
<li>
<span style="font-weight:normal">
<strong>
<span style="font-size:10pt">
<span style="font-family:&quot;arial&quot;,sans-serif">hello</span>
</span>
</strong>
</span>
</li>
<li>
<span style="font-size:10pt">
<span style="color:rgb(0, 0, 0)">
<span style="font-family:&quot;arial&quot;,sans-serif">
<span style="font-weight:normal">
<strong>
<span style="font-size:10pt">
<span style="font-family:&quot;arial&quot;,sans-serif">world</span>
</span>
</strong>
</span>
</span>
</span>
</span>
</li>
<li>
<span style="font-size:10pt">
<span style="color:rgb(0, 0, 0)">
<span style="font-family:&quot;arial&quot;,sans-serif">
<span style="font-weight:normal">
<strong>
<span style="font-size:10pt">
<span style="font-family:&quot;arial&quot;,sans-serif">abc</span>
</span>
</strong>
</span>
</span>
</span>
</span>
</li>
</ul>
Original file line number Diff line number Diff line change
@@ -1 +1,29 @@
<p style="margin-left:0in; margin-right:0in"><span style="color:red"><span style="font-family:calibri"><span style="font-size:medium">numbered list</span></span></span></p><ol><li><p><span style="font-style:normal"><span style="font-weight:normal"><span style="color:red">first</span></span></span></p></li><li><p><span style="font-size:11pt"><span style="color:red"><span style="font-family:&quot;calibri&quot;,sans-serif"><span style="font-style:normal"><span style="font-weight:normal"><span style="color:red">second</span></span></span></span></span></span></p></li></ol>
<p style="margin-left:0in; margin-right:0in">
<span style="color:red">
<span style="font-family:calibri">
<span style="font-size:medium">numbered list</span>
</span>
</span>
</p>
<ol>
<li>
<span style="font-style:normal">
<span style="font-weight:normal">
<span style="color:red">first</span>
</span>
</span>
</li>
<li>
<span style="font-size:11pt">
<span style="color:red">
<span style="font-family:&quot;calibri&quot;,sans-serif">
<span style="font-style:normal">
<span style="font-weight:normal">
<span style="color:red">second</span>
</span>
</span>
</span>
</span>
</span>
</li>
</ol>

Large diffs are not rendered by default.

Loading

0 comments on commit 13aee25

Please sign in to comment.