[wikitext] id in HeadingBlock [message #759175] |
Sun, 27 November 2011 06:11  |
Eclipse User |
|
|
|
I am working on Bug 291239: Google WikiSyntax for Wikitext.
As I looked in the other syntax implementation, I wonder why they add an I to the heading block (using the IdGenerator):
final Attributes attributes = new Attributes();
if (attributes.getId() == null) {
attributes.setId(state.getIdGenerator().newId("h" + level, text)); //$NON-NLS-1$
}
builder.beginHeading(level, attributes);
I can imagine this is used in the Outline View (using the editor) or for ToC in some format like Docbook or EclipseHelp... Is this correct? Should I also add this id, or can I ignore it?
Thanks for your answer.
|
|
|
Re: [wikitext] id in HeadingBlock [message #759221 is a reply to message #759175] |
Sun, 27 November 2011 14:15  |
Eclipse User |
|
|
|
Jeremie,
I recommend setting the Id. The id is useful when generating table of
contents or linking in other ways.
David
On 11/27/2011 3:11 AM, Jeremie Bresson wrote:
> I am working on https://bugs.eclipse.org/bugs/show_bug.cgi?id=291239.
>
> As I looked in the other syntax implementation, I wonder why they add an
> I to the heading block (using the IdGenerator):
>
> final Attributes attributes = new Attributes();
> if (attributes.getId() == null) {
> attributes.setId(state.getIdGenerator().newId("h" + level, text));
> //$NON-NLS-1$
> }
> builder.beginHeading(level, attributes);
>
>
> I can imagine this is used in the Outline View (using the editor) or for
> ToC in some format like Docbook or EclipseHelp... Is this correct?
> Should I also add this id, or can I ignore it?
>
> Thanks for your answer.
>
|
|
|
Powered by
FUDForum. Page generated in 0.03073 seconds