Commit 3ffecbdc authored by Liang Ding's avatar Liang Ding

🎨 #12653

parent 095b8a92
...@@ -26,7 +26,7 @@ import java.util.regex.Pattern; ...@@ -26,7 +26,7 @@ import java.util.regex.Pattern;
* Emotions utilities. * Emotions utilities.
* *
* @author <a href="http://88250.b3log.org">Liang Ding</a> * @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.0.0.0, May 10, 2016 * @version 1.0.0.1, Feb 18, 2019
* @since 1.4.0 * @since 1.4.0
*/ */
public final class Emotions { public final class Emotions {
...@@ -431,6 +431,7 @@ public final class Emotions { ...@@ -431,6 +431,7 @@ public final class Emotions {
"hourglass_flowing_sand", "hourglass_flowing_sand",
"house", "house",
"house_with_garden", "house_with_garden",
"huaji",
"hurtrealbad", "hurtrealbad",
"hushed", "hushed",
"ice_cream", "ice_cream",
...@@ -954,9 +955,11 @@ public final class Emotions { ...@@ -954,9 +955,11 @@ public final class Emotions {
for (final String emojiCode : EMOJIS) { for (final String emojiCode : EMOJIS) {
final String emoji = ":" + emojiCode + ":"; final String emoji = ":" + emojiCode + ":";
ret = ret.replace(emoji, "<img align=\"absmiddle\" alt=\"" + emoji + "\" class=\"emoji\" src=\"" String repl = "<img align=\"absmiddle\" alt=\"" + emoji + "\" class=\"emoji\" src=\""
+ staticServePath + "/js/lib/emojify.js-1.1.0/images/basic/" + emojiCode + staticServePath + "/js/lib/emojify.js-1.1.0/images/basic/" + emojiCode;
+ ".png\" title=\"" + emoji + "\" width=\"20px\" height=\"20px\"></img>"); final String suffix = "huaji".equals(emojiCode) ? ".gif" : ".png";
repl += suffix + "\" title=\"" + emoji + "\" width=\"20px\" height=\"20px\"></img>";
ret = ret.replace(emoji, repl);
} }
return ret; return ret;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment