New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

habitica-markdown

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

habitica-markdown - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

2

package.json
{
"name": "habitica-markdown",
"version": "1.1.1",
"version": "1.1.2",
"description": "A markdown-it module pre-configured for use in Habitica",

@@ -5,0 +5,0 @@ "main": "index.js",

var markdownitEmoji = require('markdown-it-emoji');
var specialCases = {
'+1': '%2B1', // s3 urls can't have a + sign in them, use the html encoded version
};

@@ -7,6 +10,11 @@ // https://github.com/markdown-it/markdown-it-emoji/tree/4d5f6af1b6efb0975dae2ac51dbe6252636724aa#change-output

md.renderer.rules.emoji = function markdownEmojiRules (token, idx) {
var emoji = token[idx];
var src = 'https://s3.amazonaws.com/habitica-assets/cdn/emoji/' + emoji.markup + '.png';
var emoji = token[idx].markup;
if (emoji in specialCases) {
emoji = specialCases[emoji];
}
var src = 'https://s3.amazonaws.com/habitica-assets/cdn/emoji/' + emoji + '.png';
var style = 'height: 1.5em; width: 1.5em';
return '<img class="habitica-emoji" style="' + style + '" src="' + src + '" alt="' + emoji.markup + '">';
return '<img class="habitica-emoji" style="' + style + '" src="' + src + '" alt="' + emoji + '">';
};

@@ -13,0 +21,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc