Community
Participate
Working Groups
When attempting to generate documentation for the Linux Tools Valgrind User Guide (http://wiki.eclipse.org/Linux_Tools_Project/Valgrind/User_Guide), we have two templates that cause the doc validation generation to fail. The error message is a missing </div> tag. These templates are: {{#eclipseproject:technology.linux-distros}} {{Linux_Tools}} Linux_Tools expands to an Infobox that we use on all of our wiki pages. This content is unnecessary for the user guide itself, but specifying templateExcludes="*eclipseproject*, Linux_Tools" or templateExcludes="*eclipseproject*, Infobox" does not remove the templates from the generated HTML files. I was able to workaround this by temporarily removing the templates in the wiki to generate the docs, but I thought I would bring this issue to your attention.
Thanks for the bug.
I was able to reproduce the problem with the Linux_Tools template: it turns out there was an error in how we were escaping the underscore when building a regular expression. The fix has been pushed to master and will be in the next build. As for the eclipseproject template, I noticed that the template is referenced using the following syntax in the page: bc. {{#eclipseproject:technology.linux-distros}} What is the reason for the '#' character? Currently Mylyn WikiText will not detect #eclipseproject as a template because of the leading '#' (only names matching the pattern [a-zA-Z_ :] are detected)
Created attachment 209241 [details] mylyn/context/zip
(In reply to comment #2) > I was able to reproduce the problem with the Linux_Tools template: it turns out > there was an error in how we were escaping the underscore when building a > regular expression. The fix has been pushed to master and will be in the next > build. > > As for the eclipseproject template, I noticed that the template is referenced > using the following syntax in the page: > > bc. {{#eclipseproject:technology.linux-distros}} > > What is the reason for the '#' character? Currently Mylyn WikiText will not > detect #eclipseproject as a template because of the leading '#' (only names > matching the pattern [a-zA-Z_ :] are detected) The reason to have # in front is because this is the only way to hide the default edit/history/... toolbar-like line. If I drop the # thetemplate is question is not applied but a "Template:Eclipseproject:technology.linux-distros" line is shown. It's quite possible that this is caused by me not having enough knowledge about wikis.
Looking at http://www.mediawiki.org/wiki/Help:Magic_words there is {{#language|#dateformat and etc. so this looks like smth supported.
Hello, I've mentioned this bug in a page describing how to build Valgrind doc plug-in: http://wiki.eclipse.org/Linux_Tools_Project/Building_Valgrind_Doc And I would like to ask, to whoever who solves this bug in the future, to please remove the reference inside that page when the step of removing the templates isn't necessary anymore. Thanks!
I've updated template matching so that it now matches template names that begin with a hash '#' character. This should resolve the problem where the template was not matched correctly. Feel free to give it another go (with the latest build) and let me know if it's working for you.
Hello, I had to remove the following lines: {{#eclipseproject:technology.linux-distros}} {{Linux_Tools}} From the http://wiki.eclipse.org/Linux_Tools_Project/PERF/User_Guide page to successfully run the ant build, otherwise validation fails. This happened just now, using the latest build, and I think it's relevant for this bug. Thanks.
Thanks for the heads-up, it's relevant.
Unfortunately this won't make it for the release.
(In reply to comment #8) Correct me if I am wrong, but this is a ant task that reproduce this bug: <target name="to-eclipse-help" description="Converting to Eclipse Help" > <mediawiki-to-eclipse-help wikiBaseUrl="http://wiki.eclipse.org/" validate="true" failonvalidationerror="true" prependImagePrefix="images" formatoutput="true" defaultAbsoluteLinkTarget="doc_external" dest="${dist}" title="A test with Linux Tools" generateUnifiedToc="false" templateExcludes="*eclipseproject*, Linux_Tools"> <!-- ${src}/Article/ --> <path name="Linux_Tools_Project/PERF/User_Guide" title="PERF (User Guide)" generateToc="true"/> </mediawiki-to-eclipse-help> </target> I have tested with: * org.eclipse.mylyn.wikitext.core_1.8.0.I20120907-2057.jar * org.eclipse.mylyn.wikitext.mediawiki.core_1.8.0.I20120907-2057.jar I got BUILD SUCCESSFUL Total time: 14 seconds From what I have seen, "Linux_Tools" is not the problem: it is correctly excluded by the task. But for your function call to "#eclipseproject" everything is not OK ("#eclipseproject" is probably a custom MediaWiki plug-in to modify the navigation bar on the left with content from eclipse.org) I got: PERF (User Guide) Installing -> ------------------------------------------------------------- {{#eclipseproject:technology.linux-distros}} Overview ... I assume that in the output the line "{{#eclipseproject:technology.linux-distros}}" is not expected. Let me know if this is correct. I will try to understand why template resolver do not handle this well.
I think I have fixed the bug: https://git.eclipse.org/r/7804 Problem was @{{#eclipseproject:technology.linux-distros}}@ contains "." and "-". These 2 chars were not expected in TemplateProcessor.templatePattern pattern.
Questions answered in Gerrit.
review submitted, thanks Jeremie.