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

discord-markdown

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

discord-markdown - npm Package Compare versions

Comparing version 2.4.1 to 2.4.2

12

CHANGELOG.md

@@ -0,1 +1,13 @@

# [2.4.2](https://github.com/brussell98/discord-markdown/compare/v2.4.1...v2.4.2) (2021-02-19)
### Improvements
- Changed code to use the `markdown.outFor(rule, key)` API
- Upgraded `highlight.js` from 10.1.2 to 10.6.0
- Updated `simple-markdown` from 0.7.2 to 0.7.3
### Fixes
- Fixed animated emoji URLs
# [2.4.1](https://github.com/brussell98/discord-markdown/compare/v2.4.0...v2.4.1) (2020-09-23)

@@ -2,0 +14,0 @@

8

index.js

@@ -215,3 +215,3 @@ const markdown = require('simple-markdown');

class: `d-emoji${node.animated ? ' d-emoji-animated' : ''}`,
src: `https://cdn.discordapp.com/emojis/${node.id}.png`,
src: `https://cdn.discordapp.com/emojis/${node.id}.${node.animated ? 'gif' : 'png'}`,
alt: `:${node.name}:`

@@ -262,7 +262,7 @@ }, false, state);

const parser = markdown.parserFor(rules);
const htmlOutput = markdown.htmlFor(markdown.ruleOutput(rules, 'html'));
const htmlOutput = markdown.outputFor(rules, 'html');
const parserDiscord = markdown.parserFor(rulesDiscordOnly);
const htmlOutputDiscord = markdown.htmlFor(markdown.ruleOutput(rulesDiscordOnly, 'html'));
const htmlOutputDiscord = markdown.outputFor(rulesDiscordOnly, 'html');
const parserEmbed = markdown.parserFor(rulesEmbed);
const htmlOutputEmbed = markdown.htmlFor(markdown.ruleOutput(rulesEmbed, 'html'));
const htmlOutputEmbed = markdown.outputFor(rulesEmbed, 'html');

@@ -269,0 +269,0 @@ /**

{
"name": "discord-markdown",
"version": "2.4.1",
"version": "2.4.2",
"description": "A markdown parser for Discord messages",

@@ -26,4 +26,4 @@ "keywords": [

"dependencies": {
"highlight.js": "^10.1.2",
"simple-markdown": "^0.7.2"
"highlight.js": "^10.6.0",
"simple-markdown": "^0.7.3"
},

@@ -30,0 +30,0 @@ "devDependencies": {

@@ -74,3 +74,3 @@ const markdown = require('../index');

expect(markdown.toHTML('heh <a:blah:1234>', ))
.toBe('heh <img class="d-emoji d-emoji-animated" src="https://cdn.discordapp.com/emojis/1234.png" alt=":blah:">');
.toBe('heh <img class="d-emoji d-emoji-animated" src="https://cdn.discordapp.com/emojis/1234.gif" alt=":blah:">');
});

@@ -94,6 +94,6 @@

.toBe('<span class="d-spoiler">strange</span>markdown||');
expect(markdown.toHTML('||<i>itallics</i>||'))
.toBe('<span class="d-spoiler">&lt;i&gt;itallics&lt;/i&gt;</span>');
expect(markdown.toHTML('||<i>italics</i>||'))
.toBe('<span class="d-spoiler">&lt;i&gt;italics&lt;/i&gt;</span>');
expect(markdown.toHTML('||```\ncode\nblock\n```||'))
.toBe('<span class="d-spoiler"><pre><code class="hljs">code\nblock</code></pre></span>');
});

@@ -33,3 +33,3 @@ const markdown = require('../index');

test('no undserscore italic in one word', () => {
test('no underscore italic in one word', () => {
expect(markdown.toHTML('test_ing_stuff'))

@@ -36,0 +36,0 @@ .toBe('test_ing_stuff');

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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