Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate anchor link when I use same name header. #15

Open
gamerinshaft opened this issue Jan 22, 2018 · 2 comments
Open

Duplicate anchor link when I use same name header. #15

gamerinshaft opened this issue Jan 22, 2018 · 2 comments
Labels

Comments

@gamerinshaft
Copy link

2018-01-22 14 10 21

I resolved this problem by adding this code:

mokuji.js line 181

180     var textContent = this.censorshipId(node.textContent);
181     node.id = this.censorshipId(node.id);  // I added this code :D
182
183     // add to wrapper
184     node.id = this.setAnchor(node.id, textContent, options.anchorType);
185     ol.appendChild(this.buildList(node, a.cloneNode(false), li.cloneNode(false)));

2018-01-22 14 19 47

It's working without bug, but there may be better way.

plz check it out 👍

@hiro0218
Copy link
Owner

hiro0218 commented Jan 22, 2018

お知らせありがとうございます!🙏
処理を確認次第、参考にさせていただきます!

@gamerinshaft
Copy link
Author

LGTM

@hiro0218 hiro0218 added the bug label Jun 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants