Wikitext OutlineItem: how can I get the heading text? [message #1684392] |
Wed, 18 March 2015 08:02  |
Eclipse User |
|
|
|
We are using wikitext with mediawiki syntax, and try to get the original text of a heading from its OutlineItem.
I see two options, both of which have some limitation:
- getLabel(): looks good, but "could be truncated"
- getId(): seems to contain everything but decoding it difficult.
So far we are using getId() and decode in two steps:
- replace all '.' by '%'
- use URLDecoder.decode()
This actually worked fine, until we hit the first occurrence of '.' in an original heading. We could not find a way to distinguish a genuine '.' from the start of an escape sequence.
Is there a solution that avoids both limitations?
thanks
Stephan
|
|
|
|
Re: Wikitext OutlineItem: how can I get the heading text? [message #1695655 is a reply to message #1695370] |
Mon, 18 May 2015 08:04  |
Eclipse User |
|
|
|
David Green wrote on Wed, 13 May 2015 21:16
Are you using the OutlineParser programatically? If so, truncation can be controlled using OutlineParser.setLabelMaxLength() ...
Yes, we call OutlineParser from our code. I'll check how we need to configure the parser to produce the desired result.
thanks,
Stephan
|
|
|
Powered by
FUDForum. Page generated in 0.04638 seconds