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

Bug 389812

Summary: TracWiki rendered text does not match formatting of Trac's native rendering
Product: z_Archived Reporter: Dan G. Switzer, II <dswitzer>
Component: MylynAssignee: Jeremie Bresson <dev>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: dev, greensopinion
Version: unspecified   
Target Milestone: 1.8.0   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Mylyn vs Trac Wiki formatting test
none
mylyn/context/zip none

Description Dan G. Switzer, II CLA 2012-09-18 08:39:01 EDT
Created attachment 221194 [details]
Mylyn vs Trac Wiki formatting test

The TracWiki editor does not render text very closely to Trac's native rendering. It looks like TracWiki is really literal in following the WikiFormatting guidelines, but Trac does follow such a strict guideline.

The biggest issue appears to be that TracWiki *requires* a leading space before ordered and unordered lists.

For example, the following text renders differently in Mylyn and in Trac (see screenshot.)

---------------------------------------------------
This shows formatting issues.

1. Apples
2. Oranges
3. Grapes

* Apples
  * Sauce
  * Juice
* Oranges
* Grapes
---------------------------------------------------

The problem is our users enter text in via the Web UI and it looks great, but then it comes into Trac and we end up having to view it as "Unformatted" text--which isn't ideal.
Comment 1 David Green CLA 2012-09-18 17:58:41 EDT
Thanks for the bug and screenshot.  I've attached a context of the relevant code.  Any contributions in this area would be appreciated.
Comment 2 David Green CLA 2012-09-18 17:58:43 EDT
Created attachment 221220 [details]
mylyn/context/zip
Comment 3 Jeremie Bresson CLA 2012-09-19 13:02:46 EDT
Patch proposal here:
https://git.eclipse.org/r/7835

WikiFormatting reference guide for lists is here:
http://trac.edgewall.org/demo-1.0/wiki/WikiFormatting#Lists

I am not sure we got everything described there, but the patch contains fixes for the cases given in #c0. (added as JUnit tests)
Comment 4 David Green CLA 2012-09-20 09:57:24 EDT
Nice work Jeremie, thanks.

Fixed by merging review https://git.eclipse.org/r/7835