jQuery-Plugin-stringToSlug | stringToSlug converts any string to SLUG
kandi X-RAY | jQuery-Plugin-stringToSlug Summary
kandi X-RAY | jQuery-Plugin-stringToSlug Summary
jQuery plugin stringToSlug
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of jQuery-Plugin-stringToSlug
jQuery-Plugin-stringToSlug Key Features
jQuery-Plugin-stringToSlug Examples and Code Snippets
Community Discussions
Trending Discussions on jQuery-Plugin-stringToSlug
QUESTION
How would you not replace dots using String To Slug (http://leocaseiro.github.io/jQuery-Plugin-stringToSlug/). Currently if you use a dot on the string is replaced with a hyphen, but I would like for the slug to keep the dot, not to replace it.
Thanks!
...ANSWER
Answered 2021-Oct-12 at 15:04Debugged the issue with jQuery-Plugin-stringToSlug
plugin. It was found that there is a getSlug( text, defaults.options );
function call happening from jquery.stringtoslug.js
to getSlug
method defined in speakingurl.js
, which is a dependency of jquery.stringtoslug.js
.
From the defenition of speakingurl
, under the usage
section, there is a property called mark
defined. This additionally allow chars: "-", "_", ".", "!", "~", "*", "'", "(", ")"
. This is being fetched from options
passed to getSlug
method.
This options are passed from jquery.stringtoslug.js
, which get its options from the function call stringToSlug
So you just have to set mark: true
in your options.
Working Code
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install jQuery-Plugin-stringToSlug
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page