emoji works, huzzah. addresses #681, #1840, and some discussion in #1908

This commit is contained in:
Nick Gordon
2013-11-26 21:49:53 -08:00
parent 4af9d97c33
commit 13a7292377
3 changed files with 15 additions and 5 deletions

View File

@@ -35,7 +35,9 @@
"github-buttons": "git://github.com/mdo/github-buttons.git", "github-buttons": "git://github.com/mdo/github-buttons.git",
"marked": "~0.2.9", "marked": "~0.2.9",
"JavaScriptButtons": "git://github.com/paypal/JavaScriptButtons.git#master", "JavaScriptButtons": "git://github.com/paypal/JavaScriptButtons.git#master",
"Angular-At-Directive": "git://github.com/snicker/Angular-At-Directive#master" "Angular-At-Directive": "git://github.com/snicker/Angular-At-Directive#master",
"js-emoji": "git://github.com/iamcal/js-emoji#master",
"gemoji": "git://github.com/github/gemoji"
}, },
"resolutions": { "resolutions": {
"jquery": "~2.0.3", "jquery": "~2.0.3",

View File

@@ -81,12 +81,18 @@ habitrpg.directive('habitrpgSortable', ['User', function(User) {
// return hljs.highlightAuto(code).value; // return hljs.highlightAuto(code).value;
// } // }
}); });
emoji.img_path = 'bower_components/gemoji/images/emoji/unicode/';
var toHtml = function (markdown) { var toHtml = function (markdown) {
if (markdown == undefined) if (markdown == undefined)
return ''; return '';
return marked(markdown); markdown = marked(markdown);
markdown = emoji.replace_colons(markdown);
markdown = emoji.replace_unified(markdown);
return markdown;
}; };
// [nickgordon20131123] this hacky override wraps images with a link to the image in a new window, and also adds some classes in case we want to style // [nickgordon20131123] this hacky override wraps images with a link to the image in a new window, and also adds some classes in case we want to style
@@ -133,7 +139,7 @@ habitrpg.directive('habitrpgSortable', ['User', function(User) {
+ '></a>'; + '></a>';
} }
} }
//hljs.tabReplace = ' '; //hljs.tabReplace = ' ';
return { return {

View File

@@ -16,6 +16,7 @@
"bower_components/Angular-At-Directive/src/at.js", "bower_components/Angular-At-Directive/src/at.js",
"bower_components/Angular-At-Directive/src/caret.js", "bower_components/Angular-At-Directive/src/caret.js",
"bower_components/angular-bindonce/bindonce.js", "bower_components/angular-bindonce/bindonce.js",
"bower_components/js-emoji/emoji.js",
"bower_components/bootstrap/docs/assets/js/bootstrap.js", "bower_components/bootstrap/docs/assets/js/bootstrap.js",
"bower_components/angular-bootstrap/ui-bootstrap.js", "bower_components/angular-bootstrap/ui-bootstrap.js",
@@ -59,7 +60,8 @@
"css": [ "css": [
"bower_components/bootstrap/docs/assets/css/bootstrap.css", "bower_components/bootstrap/docs/assets/css/bootstrap.css",
"app.css", "app.css",
"bower_components/habitrpg-shared/dist/spritesheets.css" "bower_components/habitrpg-shared/dist/spritesheets.css",
"bower_components/js-emoji/emoji.css"
] ]
}, },
"static": { "static": {