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

@textlint/textlint-plugin-text

Package Overview
Dependencies
Maintainers
3
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 3.0.10 to 3.1.0-alpha.bbfc8f6d

16

lib/TextProcessor.js

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

var TextProcessor = exports.TextProcessor = function () {
function TextProcessor(config) {
function TextProcessor() {
var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
_classCallCheck(this, TextProcessor);
this.config = config;
// support "extension" option
this.extensions = this.config.extensions ? this.config.extensions : [];
}
_createClass(TextProcessor, [{
key: "availableExtensions",
value: function availableExtensions() {
return [".txt", ".text"].concat(this.extensions);
}
}, {
key: "processor",

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

}
}], [{
key: "availableExtensions",
value: function availableExtensions() {
return [".txt", ".text"];
}
}]);

@@ -46,0 +50,0 @@

{
"name": "@textlint/textlint-plugin-text",
"version": "3.0.10",
"version": "3.1.0-alpha.bbfc8f6d",
"description": "plain text plugin for textlint",

@@ -32,3 +32,3 @@ "homepage": "https://github.com/textlint/textlint/tree/master/packages/@textlint/textlint-plugin-text/",

"dependencies": {
"@textlint/text-to-ast": "^3.0.8"
"@textlint/text-to-ast": "^3.1.0-alpha.bbfc8f6d"
},

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

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

@@ -48,0 +48,0 @@ },

@@ -13,17 +13,33 @@ # @textlint/textlint-plugin-text

This plugin is built-in support on textlint.
This plugin is built-in in textlint.
No need configuration.
-----
------
No need configuration.
Following config is set by default.
Manually add text plugin to do following:
```
{
"plugins": [
"text"
]
"plugins": {
"@textlint/markdown": true
}
}
```
## Options
- `extensions`: `string[]`
- Additional file extensions for markdown
For example, if you want to treat `.custom-ext` as text, put following config to `.textlintrc`
```json5
{
"plugins": {
"@textlint/text": {
"extensions": [".custom-ext"]
}
}
}
```
## Changelog

@@ -30,0 +46,0 @@

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

import { parse } from "@textlint/text-to-ast";
export class TextProcessor {
constructor(config) {
constructor(config = {}) {
this.config = config;
// support "extension" option
this.extensions = this.config.extensions ? this.config.extensions : [];
}
static availableExtensions() {
return [".txt", ".text"];
availableExtensions() {
return [".txt", ".text"].concat(this.extensions);
}

@@ -14,0 +17,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