Bug 341229 - subscript & superscript conversion fails for Textile
Summary: subscript & superscript conversion fails for Textile
Status: RESOLVED WONTFIX
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: David Green CLA
QA Contact: David Green CLA
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2011-03-29 09:40 EDT by Alex Dancu CLA
Modified: 2013-08-02 12:41 EDT (History)
1 user (show)

See Also:


Attachments
mylyn/context/zip (2.06 KB, application/octet-stream)
2011-06-20 21:57 EDT, David Green CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Dancu CLA 2011-03-29 09:40:15 EDT
Build Identifier: mylyn-wikitext-standalone-3.5.0.I20110104-0100

When using '[]' syntax for sub/superscript, the '[', ']' are not dropped from the output.

Ex: 
input: b[^n^]
output: b[<sup>n</sup>]
expected output: b<sup>n</sup>

input: b[~n~]
output: b[<sub>n</sub>]
expected output: b<sub>n</sub> 

Reproducible: Always
Comment 1 David Green CLA 2011-04-04 12:29:26 EDT
Thanks for the bug report.  Can you please clarify what markup language you're using?
Comment 2 Alex Dancu CLA 2011-04-04 13:35:25 EDT
(In reply to comment #1)
> Thanks for the bug report.  Can you please clarify what markup language you're
> using?

Sorry, I forgot to mention that the problem appears for Textile.

Using MarkupParser programatically: 
public String toHtml(String textileContent) {
 StringWriter writer = new StringWriter(); 
 HtmlDocumentBuilder builder = new HtmlDocumentBuilder(writer);
 builder.setEmitAsDocument(false);
 MarkupParser parser = new MarkupParser();
 parser.setBuilder(builder);
 parser.setMarkupLanguage(new TextileLanguage());
 parser.parse(textileContent);

 return writer.toString();
}


Best Regards,
Alex D
Comment 3 David Green CLA 2011-04-04 14:41:22 EDT
Using [] is a Textile 2.0 expression to allow for inline tags.  Normally, Textile requires surrounding whitespace for tags.  Eg: =="one *two* three"== however in some cases the tags are desired mid-word, for example =="one*two*three"==.  Textile 2.0 supports this via syntax like this: =="one[*two*]three"==
Comment 4 David Green CLA 2011-06-06 14:11:52 EDT
sorry, this one didn't make it for Indigo.
Comment 5 David Green CLA 2011-06-20 21:57:46 EDT
Created attachment 198299 [details]
mylyn/context/zip
Comment 6 David Green CLA 2013-08-02 12:41:56 EDT
Closed as part of backlog clean-up.  Please re-open if you'd like to see this revisited, perhaps with a contribution.