You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need a specific slugify function to avoid accentuated and some specials characters.
For the moment, I've directly have updated the utils.js source code. It works but it's "not clean".
For instance : str = str.split(/[àèìòùÀÈÌÒÙáéíóúýÁÉÍÓÚÝâêîôûÂÊÎÔÛãñõÃÑÕäëïöüÿÄËÏÖÜŸçÇßØøÅåÆæœ]/).join('-');
I would rather use your option options.slugify
Do you have at least one example to show me how to use this option please?
Thanks for your help.
Regards,
Jean
The text was updated successfully, but these errors were encountered:
consttoc=require('markdown-toc');constslugify=str=>{// your custom logic here};console.log(toc(input,{ slugify }));
Is this what you mean?
Also, I published markdown-slug a while ago, for this kind of situation. If you still need to add custom logic with that lib, and you want to do a PR that would be awesome.
Hi
I need a specific slugify function to avoid accentuated and some specials characters.
For the moment, I've directly have updated the utils.js source code. It works but it's "not clean".
For instance :
str = str.split(/[àèìòùÀÈÌÒÙáéíóúýÁÉÍÓÚÝâêîôûÂÊÎÔÛãñõÃÑÕäëïöüÿÄËÏÖÜŸçÇßØøÅåÆæœ]/).join('-');
I would rather use your option options.slugify
Do you have at least one example to show me how to use this option please?
Thanks for your help.
Regards,
Jean
The text was updated successfully, but these errors were encountered: