Skip to content
New issue

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

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

Already on GitHub? # to your account

Add explicit ids for headers #463

Closed
wants to merge 3 commits into from
Closed

Add explicit ids for headers #463

wants to merge 3 commits into from

Conversation

killall5
Copy link

@killall5 killall5 commented Aug 1, 2014

No description provided.

@KrishnaPG
Copy link

Wondering if this PR takes this situation #664 into account or falls prey to the same inconsistent casing problem.

@Feder1co5oave
Copy link
Contributor

Please describe what this PR is for.

Lexer.prototype.id_generator = function(title, explicit_id) {
var draft = explicit_id ? explicit_id : title;
draft = this.options.headerPrefix + draft;
return draft.toLowerCase().replace(/[^\w]+/g, '-');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explicit ID should be returned as is, without being case-converted or transformed in any way. If author supplied explicit IDs, there must be a good reason why he did so. Hence it should be used as is. No point in transforming it any further.

@joshbruce
Copy link
Member

Believe this is already taken care of.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants