3
[JavaScript] Wrap Pāli Words in Span Element
source link: http://siongui.github.io/2016/04/02/javascript-wrap-pali-words-in-span-element/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
[JavaScript] Wrap Pāli Words in Span Element
April 02, 2016
Wrap Pāli words in span element via regular expression and JavaScript.
function markInSpan(htmlString) { return string.replace(/[AaBbCcDdEeGgHhIiJjKkLlMmNnOoPpRrSsTtUuVvYyĀāĪīŪūṀṁṂṃŊŋṆṇṄṅÑñṬṭḌḍḶḷ]+/g, '<span>$&</span>'); }
References:
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK