mirror of
https://github.com/twitter/twemoji.git
synced 2024-06-15 03:35:16 +00:00
improved the example to exclude ®, © and ™
This commit is contained in:
parent
d82fa62004
commit
c23dc3f27d
@ -238,8 +238,9 @@ To exclude certain characters from being replaced by twemoji.js, call twemoji.pa
|
|||||||
twemoji.parse(document.body, {
|
twemoji.parse(document.body, {
|
||||||
callback: function(icon, options, variant) {
|
callback: function(icon, options, variant) {
|
||||||
switch ( icon ) {
|
switch ( icon ) {
|
||||||
case 'a9': // copyright
|
case 'a9': // copyright ©
|
||||||
case 'ae': // trademark
|
case 'ae': // trademark ®
|
||||||
|
case '2122': // team ™
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return ''.concat(options.base, options.size, '/', icon, options.ext);
|
return ''.concat(options.base, options.size, '/', icon, options.ext);
|
||||||
|
2
svg.sh
2
svg.sh
@ -15,7 +15,7 @@ viewport() {
|
|||||||
for f in svg/*.svg; do
|
for f in svg/*.svg; do
|
||||||
content=$(
|
content=$(
|
||||||
cat "$f" |
|
cat "$f" |
|
||||||
sed 's/<!-- Created with Inkscape (http:\/\/www.inkscape.org\/) -->//' |
|
sed 's/<!-- Created with Inkscape (http:\/\/inkscape.org\/) -->//' |
|
||||||
sed 's/width="47.5"/viewBox="0 0 47.5 47.5"/' |
|
sed 's/width="47.5"/viewBox="0 0 47.5 47.5"/' |
|
||||||
sed 's/height="47.5"/style="enable-background:new 0 0 47.5 47.5;"/' |
|
sed 's/height="47.5"/style="enable-background:new 0 0 47.5 47.5;"/' |
|
||||||
sed -e ':a' -e 'N' -e '$!ba' -e 's/\n//g' |
|
sed -e ':a' -e 'N' -e '$!ba' -e 's/\n//g' |
|
||||||
|
Loading…
Reference in New Issue
Block a user