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

@textlint/textlint-plugin-markdown

Package Overview
Dependencies
Maintainers
3
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@textlint/textlint-plugin-markdown - npm Package Compare versions

Comparing version 4.0.10 to 4.1.0-alpha.0f2fd6f9

15

lib/MarkdownProcessor.js

@@ -17,9 +17,17 @@ /* eslint-disable no-unused-vars */

var MarkdownProcessor = exports.MarkdownProcessor = function () {
function MarkdownProcessor(config) {
function MarkdownProcessor() {
var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
_classCallCheck(this, MarkdownProcessor);
this.config = config;
this.extensions = config.extensions ? config.extensions : [];
}
_createClass(MarkdownProcessor, [{
key: "availableExtensions",
value: function availableExtensions() {
return [".md", ".markdown", ".mdown", ".mkdn", ".mkd", ".mdwn", ".mkdown", ".ron"].concat(this.extensions);
}
}, {
key: "processor",

@@ -39,7 +47,2 @@ value: function processor(ext) {

}
}], [{
key: "availableExtensions",
value: function availableExtensions() {
return [".md", ".markdown", ".mdown", ".mkdn", ".mkd", ".mdwn", ".mkdown", ".ron"];
}
}]);

@@ -46,0 +49,0 @@

8

package.json
{
"name": "@textlint/textlint-plugin-markdown",
"version": "4.0.10",
"version": "4.1.0-alpha.0f2fd6f9",
"description": "Markdown support for textlint.",

@@ -36,3 +36,3 @@ "keywords": [

"dependencies": {
"@textlint/markdown-to-ast": "^6.0.8"
"@textlint/markdown-to-ast": "^6.1.0-alpha.0f2fd6f9"
},

@@ -46,6 +46,6 @@ "devDependencies": {

"cross-env": "^4.0.0",
"mocha": "^4.0.1",
"mocha": "^5.1.1",
"power-assert": "^1.4.1",
"rimraf": "^2.6.2",
"textlint": "^10.2.1",
"textlint": "^10.3.0-alpha.0f2fd6f9",
"textlint-rule-no-todo": "^2.0.0"

@@ -52,0 +52,0 @@ },

@@ -16,12 +16,30 @@ # @textlint/textlint-plugin-markdown

Manually add Markdown plugin to do following:
Following config is set by default.
```
{
"plugins": [
"markdown"
]
"plugins": {
"@textlint/markdown": true
}
}
```
## Options
- `extensions`: `string[]`
- Additional file extensions for markdown
For example, if you want to treat `.hown` as markdown, put following config to `.textlintrc`
```json5
{
"plugins": {
"@textlint/markdown": {
"extensions": [".hown"]
}
}
}
```
## Tests

@@ -28,0 +46,0 @@

@@ -5,9 +5,11 @@ /* eslint-disable no-unused-vars */

import { parse } from "@textlint/markdown-to-ast";
export class MarkdownProcessor {
constructor(config) {
constructor(config = {}) {
this.config = config;
this.extensions = config.extensions ? config.extensions : [];
}
static availableExtensions() {
return [".md", ".markdown", ".mdown", ".mkdn", ".mkd", ".mdwn", ".mkdown", ".ron"];
availableExtensions() {
return [".md", ".markdown", ".mdown", ".mkdn", ".mkd", ".mdwn", ".mkdown", ".ron"].concat(this.extensions);
}

@@ -14,0 +16,0 @@

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