Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

carta-md

Package Overview
Dependencies
Maintainers
1
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

carta-md - npm Package Compare versions

Comparing version 1.1.5 to 1.1.6

7

dist/internal/carta.js

@@ -6,3 +6,2 @@ import { marked } from 'marked';

import { defaultPrefixes } from './prefixes';
import escape from 'escape-html';
export class Carta {

@@ -49,5 +48,4 @@ options;

async render(markdown) {
const escaped = escape(markdown);
return new Promise((resolve) => {
marked.parse(escaped, (e, dirty) => {
marked.parse(markdown, (e, dirty) => {
resolve((this.options?.sanitizer && this.options?.sanitizer(dirty)) ?? dirty);

@@ -63,4 +61,3 @@ });

renderSSR(markdown) {
const escaped = escape(markdown);
const dirty = marked.parse(escaped);
const dirty = marked.parse(markdown);
if (this.options?.sanitizer)

@@ -67,0 +64,0 @@ return this.options.sanitizer(dirty);

@@ -36,3 +36,7 @@ /**

readonly maker: (prev: string) => string;
}, {
readonly id: "blockquote";
readonly match: (line: string) => string | undefined;
readonly maker: (prev: string) => string;
}];
export type DefaultPrefixId = (typeof defaultPrefixes)[number]['id'];

@@ -28,3 +28,8 @@ export const defaultPrefixes = [

maker: (prev) => `${Number(prev.slice(0, -1)) + 1}. `
},
{
id: 'blockquote',
match: (line) => line.match(/^(> *)+/gm)?.at(0),
maker: (prev) => prev
}
];

@@ -13,3 +13,3 @@ {

},
"version": "1.1.5",
"version": "1.1.6",
"scripts": {

@@ -25,3 +25,2 @@ "dev": "vite dev",

"@sveltejs/package": "^2.0.2",
"@types/escape-html": "^1.0.2",
"@types/marked": "^4.0.8",

@@ -36,3 +35,3 @@ "@types/prismjs": "^1.26.0",

"type": "module",
"dependencies": { "escape-html": "^1.0.3", "marked": "^4.3.0", "prismjs": "^1.29.0" },
"dependencies": { "marked": "^4.3.0", "prismjs": "^1.29.0" },
"peerDependencies": { "svelte": "^3.54.0" },

@@ -39,0 +38,0 @@ "keywords": [

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