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

@dice-roller/vuepress-plugin-dice-roller

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

@dice-roller/vuepress-plugin-dice-roller - npm Package Compare versions

Comparing version 1.2.4 to 1.3.0-alpha.0

3

package.json
{
"name": "@dice-roller/vuepress-plugin-dice-roller",
"version": "1.2.4",
"version": "1.3.0-alpha.0",
"description": "Plugin for VuePress that allows rolling dice",

@@ -38,2 +38,3 @@ "type": "module",

"dependencies": {
"@dice-roller/markdown-it-dice-roller": "^0.0.1-alpha.1",
"@dice-roller/vue": "^1.2.0",

@@ -40,0 +41,0 @@ "markdown-it-container": "^3.0.0"

import { getDirname, path } from '@vuepress/utils';
import markdownItContainer from 'markdown-it-container';
import { Roll, Roller } from '@dice-roller/markdown-it-dice-roller';
const __dirname = getDirname(import.meta.url);
const render = (tokens, idx) => {
/* const render = (tokens, idx) => {
const { nesting, info } = tokens[idx];

@@ -18,4 +18,18 @@

return '';
};
};*/
/* const render = (tokens, idx) => {
const { nesting, info } = tokens[idx];
if (nesting === 1) {
// opening tag
const [, notation] = info.trim().match(/^rolls?\s+(.*?)(:::)?$/s) ?? [];
//const [, ...matches] = info.trim().match(/^rolls?\s+(.*?)(:::)?$/s) || [];
return `<DiceRoller notation="${notation ?? ''}"/>`;
}
// closing tag
return '';
}; */
export const diceRollerPlugin = () => ({

@@ -25,4 +39,6 @@ name: '@dice-roller/vuepress-plugin-dice-roller',

extendsMarkdown: (md) => {
md.use(markdownItContainer, 'roll', { render });
//md.use(markdownItContainer, 'roll', { render });
md.use(Roll, 'roll');
md.use(Roller, 'roller');
},
});
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