Bug 467068 - mediawiki-to-eclipse-help does not properly extract local anchors that point to headings with special chars
Summary: mediawiki-to-eclipse-help does not properly extract local anchors that point ...
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: ---   Edit
Assignee: Project Inbox CLA
QA Contact: David Green CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 467060
  Show dependency tree
 
Reported: 2015-05-12 03:24 EDT by Alexander Nyßen CLA
Modified: 2015-07-25 05:18 EDT (History)
1 user (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-12 03:24:28 EDT
When using mediawiki-to-eclipse-help to extract help from http://wiki.eclipse.org/GEF/GEF4, the heading 'IAdaptable, AdapterKey' will be extracted as:

<h3 id="IAdaptable.2C_AdapterKey">IAdaptable, AdapterKey</h3>

while local links pointing to it will be generated as follows:

<a href="#IAdaptable,_AdapterKey">AdapterKey</a>

This way, navigation is broken within the eclipse help.
Comment 1 David Green CLA 2015-05-12 16:58:58 EDT
Thanks for the bug Alexander.  Feel free to make a contribution.
Comment 2 Sam Davis CLA 2015-05-12 18:46:32 EDT
This looks like it may be a duplicate of bug 388657.
Comment 3 Jeremie Bresson CLA 2015-06-23 18:02:14 EDT
(In reply to Sam Davis from comment #2)
> This looks like it may be a duplicate of bug 388657.

I knew it sounded familiar...

Do you want me to try to rebase my change?
https://git.eclipse.org/r/#/c/7568/ 
(It is almost 2 years old, but I think I still can help).

At least you will be able to see if this works for your use case or not.

I feel really sad to see that my patch never was integrated into the master branch. I stopped working on this, because I could not investigate/review the “suspect differences” produced by my patch and mentioned by David Green.
Comment 4 David Green CLA 2015-06-25 12:16:31 EDT
Jeremie, I'm sorry that we weren't able to get that one in.  Is there something holding you back from reviewing the differences?  Let me know if there's anything that I can do to help move that one forward.
Comment 5 Jeremie Bresson CLA 2015-06-27 04:17:08 EDT
I have rebased the change on top of master:
https://git.eclipse.org/r/7568

@David:
I never managed to see the potential regression you have mentioned. Even today when I read the description in Bug 388657 and in the mailing list message it is not clear to me.
If you want me to look into the differences, please indicated me step by step what I need to run (which repo should I checkout, what should I build…). Then I should be able to perform a diff.

@Alexander Nyßen:
Are you able to test my patched version? If it works for you, we could mark this bug as a duplicate.
If you are not able to test it, can you provide me a link to the exact GEF Manual pages in the wiki with the revision number that was not working?
Comment 6 David Green CLA 2015-07-06 20:07:39 EDT
Jeremie, I've merged the review.  Is there anything left to do here?
Comment 7 Jeremie Bresson CLA 2015-07-19 03:29:12 EDT
(In reply to David Green from comment #6)
> Jeremie, I've merged the review.  Is there anything left to do here?

I do not think so.

Unless someone can provide an example that proves otherwise, my guess is that this bug is a real duplicate of Bug 388657.

----

Here some notes if someone else wants to continue the investigation

An example of the broken title/link can be found in the page:
http://wiki.eclipse.org/GEF/GEF4/Common

> ==== IAdaptable, AdapterKey ====

With change 7568, this line of code:

> MediaWikiIdGenerationStrategy.headingTextToId("IAdaptable, AdapterKey")

Now returns:

> "IAdaptable.2C_AdapterKey"

I think that this is consistent with what MediaWiki is producing.

----

@Alexander Nyßen:

Are you using the snapshot/latest version of Mylyn Docs to produce your documentation?

Are you able to confirm that everything works as expected?

If not, feel free to reopen this bug (or a new one).

----

@A committer on the Mylyn Docs project:

I do not have the permission to mark this bug as "RESOLVED FIXED" (or as duplicate). Please do it for me.
Comment 8 Alexander Nyßen CLA 2015-07-22 01:56:40 EDT
(In reply to Jeremie Bresson from comment #7)
> (In reply to David Green from comment #6)
> > Jeremie, I've merged the review.  Is there anything left to do here?
> 
> I do not think so.
> 
> Unless someone can provide an example that proves otherwise, my guess is
> that this bug is a real duplicate of Bug 388657.
> 
> ----
> 
> Here some notes if someone else wants to continue the investigation
> 
> An example of the broken title/link can be found in the page:
> http://wiki.eclipse.org/GEF/GEF4/Common
> 
> > ==== IAdaptable, AdapterKey ====
> 
> With change 7568, this line of code:
> 
> > MediaWikiIdGenerationStrategy.headingTextToId("IAdaptable, AdapterKey")
> 
> Now returns:
> 
> > "IAdaptable.2C_AdapterKey"
> 
> I think that this is consistent with what MediaWiki is producing.
> 
> ----
> 
> @Alexander Nyßen:
> 
> Are you using the snapshot/latest version of Mylyn Docs to produce your
> documentation?
> 
> Are you able to confirm that everything works as expected?
> 
> If not, feel free to reopen this bug (or a new one).
> 
> ----
> 
> @A committer on the Mylyn Docs project:
> 
> I do not have the permission to mark this bug as "RESOLVED FIXED" (or as
> duplicate). Please do it for me.

Is there an integration build available that I could consume for testing? I could then confirm this issue is resolved.
Comment 9 David Green CLA 2015-07-24 11:48:33 EDT
@alexander the fix is available in the standalone distribution: https://www.eclipse.org/downloads/download.php?file=/mylyn/snapshots/nightly/docs/wikitext-standalone-latest.zip or if you prefer to use
Comment 10 Alexander Nyßen CLA 2015-07-25 05:18:33 EDT
I can confirm that the problem is resolved in the provided snapshot. Resolving as fixed.