Open HayDegha0917 opened 5 years ago
Is it similar to the issue I raised here : https://github.com/yakivmospan/github-wikito-converter/issues/42
I proposed a quickfix
Similar but not the same. If I understand your fix, it also has a bug, because you are assuming that the heading titles are always going to be unique. Instead of stripping the file name, you should add the name to the anchor references and modify all anchors to be "fully qualified" by adding the name of the original file to the anchor name.
Thanks, Ara
From: Pierre Baret notifications@github.com Sent: Wednesday, August 28, 2019 1:37:55 AM To: yakivmospan/github-wikito-converter github-wikito-converter@noreply.github.com Cc: HayDegha0917 a_kassabian@hotmail.com; Author author@noreply.github.com Subject: Re: [yakivmospan/github-wikito-converter] Wiki page sections with the same name are not linked correctly (#45)
Is it similar to the issue I raised here : #42https://github.com/yakivmospan/github-wikito-converter/issues/42
I proposed a quickfix
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/yakivmospan/github-wikito-converter/issues/45?email_source=notifications&email_token=AFCEJ5DVY6OLNZ3TU6NZYFLQGY2OHA5CNFSM4H3KXC72YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5KK43I#issuecomment-525643373, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AFCEJ5AWH337EHNUDMAZE43QGY2OHANCNFSM4H3KXC7Q.
Hey guys, thanks for your contribution. Will try to get into these issues as soon as possible. Pull requests are always welcomed here.
Like I say in my comment on issue #42, I am not a confortable js developper, I just found out how to make things work as expected locally on my machine. I would prefer you or a confirmed js dev to check that out.
@HayDegha0917 yes you right, I assume the id to be unique in my quick fix because it made me dig into only one place of the code where link are created. otherwise it would require to change both the html id creation and the html href.
Similar issue here, I have files with the same titles because they were originally in different directory structures (gitlab wiki). When the html page is rendered you end up with dual links as above which breaks the navigation pane.
If two Wiki pages have the same heading title (e.g., "Next Steps"), the generated anchor link will be incorrect. In general, I suggest changing any anchor references in Wiki pages (e.g.
#next-steps
) to a "fully qualified version that includes the page name (i.e.,,#page-1-next-steps
).For now, the workaround to avoid duplicate heading names.