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

@mdit-vue/plugin-component

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mdit-vue/plugin-component - npm Package Compare versions

Comparing version 0.8.0 to 0.8.1

35

dist/index.d.ts

@@ -12,12 +12,2 @@ import { PluginWithOptions } from 'markdown-it';

*
* By default, all standard [HTML inline elements](https://developer.mozilla.org/en-US/docs/Web/HTML/Inline_elements) will be
* treated as inline tags (excluding [Vue built-in special elements](https://vuejs.org/api/built-in-special-elements.html)).
*
* In some cases you might want to force some inline tags to behave like block tags. For example, when you create a Vue component
* with the same name as a standard HTML inline element (not recommended though).
*
* You can use this option to specify standard inline tags as block tags.
*
* Notice that this option is case-sensitive, and has higher priority than the `inlineTags` option.
*
* @default []

@@ -29,15 +19,2 @@ */

*
* By default, only standard [HTML inline elements](https://developer.mozilla.org/en-US/docs/Web/HTML/Inline_elements) will be
* treated as inline tags (excluding [Vue built-in special elements](https://vuejs.org/api/built-in-special-elements.html)).
*
* All other unknown elements will be treated as block tags, because we are assuming that they are custom Vue components.
*
* Treating Vue components as block tags would work as expected in most cases. However, in some edge cases, the behavior
* of block tags is not ideal with Vue components. For example, when using a HTML block tag at the beginning of a list item,
* the following Markdown syntax in the same list item will be invalid, but users might want an inline Vue component there.
*
* You can use this option to specify unknown tags as inline tags.
*
* Notice that this option is case-sensitive, and has lower priority than the `blockTags` option.
*
* @default []

@@ -60,4 +37,12 @@ */

declare const HTML_OPEN_CLOSE_TAG_RE: RegExp;
declare const HTML_SELF_CLOSING_TAG_RE: RegExp;
declare const HTML_OPEN_AND_CLOSE_TAG_IN_THE_SAME_LINE_RE: RegExp;
/**
* List of block tags
*
* @see https://spec.commonmark.org/0.30/#html-blocks
*/
declare const TAGS_BLOCK: string[];
/**
* According to markdown spec, all non-block html tags are treated as "inline"

@@ -76,3 +61,3 @@ * tags (wrapped with <p></p>), including those "unknown" tags

*
* @see https://spec.commonmark.org/0.29/#raw-html
* @see https://spec.commonmark.org/0.30/#raw-html
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Inline_elements

@@ -89,2 +74,2 @@ */

export { ComponentPluginOptions, HTML_OPEN_CLOSE_TAG_RE, HTML_TAG_RE, TAGS_INLINE, TAGS_VUE_RESERVED, componentPlugin, createHtmlBlockRule, htmlInlineRule };
export { ComponentPluginOptions, HTML_OPEN_AND_CLOSE_TAG_IN_THE_SAME_LINE_RE, HTML_OPEN_CLOSE_TAG_RE, HTML_SELF_CLOSING_TAG_RE, HTML_TAG_RE, TAGS_BLOCK, TAGS_INLINE, TAGS_VUE_RESERVED, componentPlugin, createHtmlBlockRule, htmlInlineRule };
{
"name": "@mdit-vue/plugin-component",
"version": "0.8.0",
"version": "0.8.1",
"description": "A markdown-it plugin to allow vue components in markdown",

@@ -44,2 +44,3 @@ "keywords": [

"devDependencies": {
"@vue/shared": "^3.2.37",
"c8": "^7.12.0",

@@ -52,3 +53,3 @@ "unbuild": "^0.7.6",

},
"gitHead": "7fd357a18b8bcc347cf17e2e78da3b3ed4242e58"
"gitHead": "b0b6048f30c29b9533c034832f116f74c94bef52"
}

@@ -56,8 +56,6 @@ # @mdit-vue/plugin-component

By default, all standard [HTML inline elements](https://developer.mozilla.org/en-US/docs/Web/HTML/Inline_elements) will be treated as inline tags (excluding [Vue built-in special elements](https://vuejs.org/api/built-in-special-elements.html)).
By default, all standard [HTML inline elements](https://developer.mozilla.org/en-US/docs/Web/HTML/Inline_elements) will be treated as inline tags (excluding [Vue built-in special elements](https://vuejs.org/api/built-in-special-elements.html)). All unknown elements will be assumed as Vue components, and will be treated as block tags (with slight differences).
In some cases you might want to force some inline tags to behave like block tags. For example, when you create a Vue component with the same name as a standard HTML inline element (not recommended though).
In some cases (should be rare though) you might want to force some tags to behave like block tags, then you can use this option to specify the tag names.
You can use this option to specify standard inline tags as block tags.
Notice that this option is case-sensitive, and has higher priority than the [inlineTags](#inlinetags) option.

@@ -75,10 +73,6 @@

By default, only standard [HTML inline elements](https://developer.mozilla.org/en-US/docs/Web/HTML/Inline_elements) will be treated as inline tags (excluding [Vue built-in special elements](https://vuejs.org/api/built-in-special-elements.html)).
By default, only standard [HTML inline elements](https://developer.mozilla.org/en-US/docs/Web/HTML/Inline_elements) will be treated as inline tags (excluding [Vue built-in special elements](https://vuejs.org/api/built-in-special-elements.html)). All unknown elements will be assumed as Vue components, and will be treated as block tags (with slight differences).
All other unknown elements will be treated as block tags, because we are assuming that they are custom Vue components.
Treating Vue components like block tags would work as expected in most cases. However, in some cases you might want to force some tags to behave like inline tags, then you can use this option to specify the tag names.
Treating Vue components as block tags would work as expected in most cases. However, in some edge cases, the behavior of block tags is not ideal with Vue components. For example, when using a HTML block tag at the beginning of a list item, the following Markdown syntax in the same list item will be invalid, but users might want an inline Vue component there.
You can use this option to specify unknown tags as inline tags.
Notice that this option is case-sensitive, and has lower priority than the [blockTags](#blocktags) option.

Sorry, the diff of this file is not supported yet

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