Bug 468609 - mediawiki-to-eclipse-help should ignore __NOTOC__
Summary: mediawiki-to-eclipse-help should ignore __NOTOC__
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: 2.4   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 2.7   Edit
Assignee: Mylyn Inbox CLA
QA Contact: David Green CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-28 07:05 EDT by Alexander Nyßen CLA
Modified: 2015-10-16 14:39 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Nyßen CLA 2015-05-28 07:05:05 EDT
When extracting eclipse help from mediawiki, the __NOTOC__ declarative is extracted into HTML as well.
Comment 1 Jeremie Bresson CLA 2015-06-27 16:29:56 EDT
Proposed change:
https://git.eclipse.org/r/51004
Comment 2 Jeremie Bresson CLA 2015-06-29 01:45:51 EDT
There are a lot of "behavior switches":

__NOTOC__, __FORCETOC__, __TOC__, __NOEDITSECTION__ ...

List in the MediaWiki user manual:
https://www.mediawiki.org/wiki/Help:Magic_words#Behavior_switches

I think we should catch them with __[A-Z]+__ and replace them with an empty string.
Comment 3 Jeremie Bresson CLA 2015-07-19 09:52:57 EDT
Discovered during the work on this bug:

For the "__TOC__" switch, there is already a Bloc to handle it:

> org.eclipse.mylyn.internal.wikitext.mediawiki.core.block.TableOfContentsBlock

The list of "Behavior switches" that wikitext should ignore is:
__NOTOC__
__FORCETOC__
__NOEDITSECTION__
__NEWSECTIONLINK__
__NONEWSECTIONLINK__
__NOGALLERY__
__HIDDENCAT__
__NOCONTENTCONVERT__
__NOCC__
__NOTITLECONVERT__
__NOTC__
__START__
__END__
__INDEX__
__NOINDEX__
__STATICREDIRECT__
__DISAMBIG__

See version 2 of my patch:
https://git.eclipse.org/r/51004
Comment 5 David Green CLA 2015-10-01 19:43:38 EDT
Thanks Jeremie.  I've merged https://git.eclipse.org/r/#/c/51004/

Anything left to do here?
Comment 6 Jeremie Bresson CLA 2015-10-02 02:36:49 EDT
I do not think so. I mark this bug as RESOLVED FIXED.
Comment 7 Alexander Nyßen CLA 2015-10-02 04:27:13 EDT
As no target milestone is set, which integration/milestone build provides this fix?
Comment 8 Jeremie Bresson CLA 2015-10-02 05:31:12 EDT
This was pushed on the "Master" branch; for the moment the version there is "2.6.0-SNAPSHOT".

The project has a continous build job; I guess it is already available in the maven repo:
> https://repo.eclipse.org/content/repositories/mylyn-snapshots/

Or in the "WikiText Standalone" download section on the downlaod page: 
https://www.eclipse.org/mylyn/downloads/

-----

You are absolutely right; I should have added a "Target Milestone" in this bugzilla. I am not really sure if "2.6" is correct. 

I am not really aware of the version lifecycle of the wikitext project. Isn't "2.6.0" the version released with "Mars.1"? (my commit is definitivelly too late for "Mars.1")
Comment 9 Jeremie Bresson CLA 2015-10-16 14:39:59 EDT
Added "2.7" Target Milestone