Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 331515

Summary: Empty line in table cell make rest of text dropped in conversion from mediawiki to xsl-fo
Product: z_Archived Reporter: Per Arnold Blaasmo <per-arnold.blaasmo>
Component: MylynAssignee: David Green <greensopinion>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
patch that adds a simple unit test that reproduces the problem
none
mylyn/context/zip none

Description Per Arnold Blaasmo CLA 2010-12-01 04:20:24 EST
Build Identifier: mylyn-wikitext-standalone-3.5.0.I20101110-1300

In a table with two columns text is dropped when converting from mediawiki to xsl-fo if there is empty lines in between the text.

Reproducible: Always

Steps to Reproduce:
1.Make a Mediawikipage with a table like this:
{|
|-
| width="200px" valign="top"| '''Left coloumn text'''
| [[Image:Space.gif]]
|-
| [[Image:Space.gif]]
| some text in a long line or something

'''New text after empty line gets dropped'''
line 1
line 2
----
|-
| width="200px" valign="top"| '''item 2'''
| [[Image:Space.gif]]
|-
| [[Image:Space.gif]]
| '''Some bold text'''

Text after empty line gets dropped
|}
2.Run conversion from ant with 
<wikitext-to-xslfo markupLanguage="MediaWiki" showExternalLinks="false" sourceEncoding="UTF-8">
  <fileset includes="file.mediawiki"/>
</wikitext-to-xslfo>
3.Resultinf
Comment 1 Per Arnold Blaasmo CLA 2010-12-01 04:29:16 EST
...
3. Result is that lines after empty lines is dropped in xsl-fo files.
Comment 2 David Green CLA 2010-12-02 17:04:25 EST
Created attachment 184417 [details]
patch that adds a simple unit test that reproduces the problem

thanks for the bug.  Feel free to contribute a patch that fixes the issue.  I've attached a unit test and a mylyn context for the relevant code.
Comment 3 David Green CLA 2010-12-02 17:04:27 EST
Created attachment 184418 [details]
mylyn/context/zip
Comment 4 Jeremie Bresson CLA 2012-10-19 15:33:14 EDT
This bug is fixed.

I assume that my modification on table block solved also this problem:
bug 381912: [MediaWiki] support for nested blocks in table cells. 


bc. 
<target name="to-eclipse-help" description="Converting to Eclipse Help" >
	<mediawiki-to-eclipse-help
			wikiBaseUrl="http://sablokesto.wikia.com/"
			validate="true"
			failOnValidationError="true"
			prependImagePrefix="images"
			formatOutput="true"
			defaultAbsoluteLinkTarget="doc_external"
			dest="${dist}"
			title="Wiki Test"
			generateUnifiedToc="false">
		<path name="Page331515" 
				title="Page" 
				generateToc="true"/>
  </mediawiki-to-eclipse-help>
</target>

Successfully tested with:
* org.eclipse.mylyn.wikitext.core_1.8.0.I20120907-2057.jar
* org.eclipse.mylyn.wikitext.mediawiki.core_1.8.0.I20120907-2057.jar

In my opinion, this bug can be closed.

Should the proposed Unit Test be added to the suite? I have it in my local repository, I can push it on gerrit.
Comment 5 David Green CLA 2013-01-10 17:09:32 EST
Works for me.  Added previously failing test case from attachment 184418 [details] to verify.