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

How can I change the rendering of ID of a Header element? #95

Closed
asapostolov opened this issue Feb 16, 2017 · 2 comments
Closed

How can I change the rendering of ID of a Header element? #95

asapostolov opened this issue Feb 16, 2017 · 2 comments
Labels

Comments

@asapostolov
Copy link

I'm converting Cyrillic alphabet markdown to html. When h2/3/4/5 elements are made when the alphabet is Latin the header's text is converted to id in a proper way. However when the alphabet is Cyrillic the id-s of the headers become section-1, section-2, section-3 etc.

How can I modify that behavior to be able to generate proper Cyrillic ids?

@xoofx
Copy link
Owner

xoofx commented Feb 17, 2017

By default, the auto-identifier tries to convert to ASCII using some character correspondence. Can you post an example headers with cyrillic alphabet?

Otherwise, you should be able to disable the ASCII conversion:

// Remove the previous AutoIdentifierExtension
pipelineBuilder.Extensions.Remove(pipeline.Extensions.Find<AutoIdentifierExtension>());
// Add AutoIdentifier extension with only AutoLink option
pipelineBuilder.UseAutoIdentifiers(AutoIdentifierOptions.AutoLink);

@xoofx xoofx added the question label Feb 17, 2017
@asapostolov
Copy link
Author

asapostolov commented Feb 20, 2017

Here's an Cyrillic Header

Здравейте, аз съм Петър и съм програмист

When I did as you said - I removed the extension and used AutoLink - the Ids started converting properly to Cyrillic. Thanks!

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