Open christian-schlichtherle opened 10 years ago
Hi, could you elaborate more? E.g. give an example of the issue? Thanks - and sorry for the delay in replying.
In any single module project, please add the jdepend-maven-plugin to the reporting section of the POM. Now with the reflow skin, the fragment links in the generated report are all broken because they get prepended with a slash. However, the anchor name is without the leading slash.
Am 29.01.2014 um 12:50 schrieb Andrius Velykis notifications@github.com:
Hi, could you elaborate more? E.g. give an example of the issue? Thanks - and sorry for the delay in replying.
— Reply to this email directly or view it on GitHub.
I have added jdepend-maven-plugin. What do you mean with 'fragment' links? The links seem to be working for me. Could you give a particular link that is not working---and how it appears in the generated HTML?
Thanks!
Maybe this all boils down to the same root cause, namely that somehow standard US-ASCII characters like the apostrophe get substituted with something else when generating the site?! I am using UTF-8 in our project, but will investigate the configuration again.
Thank you for your support. It is much appreciated.
Regards, Christian
Am 02.02.2014 um 17:39 schrieb Andrius Velykis notifications@github.com:
I have added jdepend-maven-plugin. What do you mean with 'fragment' links? The links seem to be working for me. Could you give a particular link that is not working---and how it appears in the generated HTML?
Thanks!
— Reply to this email directly or view it on GitHub.
Ok, I have investigated this issue further. The generated web page code seems fine. In the JDepend report, there are links to the Cycles section like this:
<a href="#cycles">cycles</a>
The Cycles section starts like this:
<a name="cycles"></a>
So this looks healthy. However, when I click on the link to the Cycles section, the browser URL becomes changed to this:
http://localhost:7070/jdepend-report.html#/cycles
Note the additional slash character before the section name in the fragment part. I do get this behavior with the latest versions of both Safari and Chrome. Is this some dark JavaScript magic?
I have seen this - it seems to be part of the "smooth scroll" JavaScript. Can you try disabling that to see if it helps: <smoothScroll>false</smoothScroll>
? I did add "smooth scroll" as a fancy add-on, but I am not fully sure whether I have integrated it well. I guess I will have to look again at some time..
Yes, this workaround resolves this issue.
Good to hear - but you mentioned that the rewritten URL broke the links, i.e. such URLs did not work at all? I think "smooth scroll" needed them like this and took care so that they are working..
Let me know if I need to investigate the links being broken with smooth scroll enabled. Thanks!
I don't understand what else you need. My comment above explains what's happening and your comment below shows a workaround. If you need some more specific information, then please explain it to me so that I can follow it up for you.
Originally you opened this issue because of the /
character being prepended. When you said "it breaks the links" - did you mean that the links are no longer "proper HTML", or that when you click on such link, the correct web page position is not opened?
I am asking because when I originally configured it, the links were being rewritten, but the smooth scroll JavaScript handled the new links to correctly scroll to the intended position. If the links do not work at all, then it is a bug and needs to be investigated. If the links work but you are not happy with the rewriting, then the workaround suffices.
Ok, as said in my previous comment, the anchor and links look healthy, but when clicking a link, the browser URL gets rewritten to a form where each fragment is prepended with a slash character and this doesn't work. The workaround inhibits the changing of the URL fragments. While this clearly helps, it no more than a workaround.
If some content references a URL fragment, then the fragment get prepended with a '/' character. However, this breaks the links.