How to use @textlint/ast-node-types - 10 common examples

To help you get started, we’ve selected a few @textlint/ast-node-types examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github textlint / textlint / packages / @textlint / markdown-to-ast / src / mapping / markdown-syntax-map.js View on Github external
const { ASTNodeTypes } = require("@textlint/ast-node-types");
const exports = {
    root: ASTNodeTypes.Document,
    paragraph: ASTNodeTypes.Paragraph,
    blockquote: ASTNodeTypes.BlockQuote,
    listItem: ASTNodeTypes.ListItem,
    list: ASTNodeTypes.List,
    Bullet: "Bullet", // no need?
    heading: ASTNodeTypes.Header,
    code: ASTNodeTypes.CodeBlock,
    HtmlBlock: ASTNodeTypes.HtmlBlock,
    ReferenceDef: ASTNodeTypes.ReferenceDef,
    thematicBreak: ASTNodeTypes.HorizontalRule,
    // inline block
    text: ASTNodeTypes.Str,
    break: ASTNodeTypes.Break,
    emphasis: ASTNodeTypes.Emphasis,
    strong: ASTNodeTypes.Strong,
    html: ASTNodeTypes.Html,
    link: ASTNodeTypes.Link,
    image: ASTNodeTypes.Image,
    inlineCode: ASTNodeTypes.Code,
    delete: ASTNodeTypes.Delete,
    // remark(markdown) extension
    // Following type is not in @textlint/ast-node-types
    yaml: "Yaml",
    table: "Table",
    tableRow: "TableRow",
    tableCell: "TableCell",
    linkReference: "LinkReference",
    imageReference: "imageReference",
    definition: "Definition"
github textlint / textlint / packages / @textlint / text-to-ast / src / plaintext-syntax.js View on Github external
// LICENSE : MIT
"use strict";
const { ASTNodeTypes } = require("@textlint/ast-node-types");
const exports = {
    Document: ASTNodeTypes.Document, // must
    Paragraph: ASTNodeTypes.Paragraph,
    // inline
    Str: ASTNodeTypes.Str, // must
    Break: ASTNodeTypes.Break // must
};
module.exports = exports;
github textlint / textlint / packages / @textlint / markdown-to-ast / src / mapping / markdown-syntax-map.js View on Github external
// LICENSE : MIT
"use strict";
const { ASTNodeTypes } = require("@textlint/ast-node-types");
const exports = {
    root: ASTNodeTypes.Document,
    paragraph: ASTNodeTypes.Paragraph,
    blockquote: ASTNodeTypes.BlockQuote,
    listItem: ASTNodeTypes.ListItem,
    list: ASTNodeTypes.List,
    Bullet: "Bullet", // no need?
    heading: ASTNodeTypes.Header,
    code: ASTNodeTypes.CodeBlock,
    HtmlBlock: ASTNodeTypes.HtmlBlock,
    ReferenceDef: ASTNodeTypes.ReferenceDef,
    thematicBreak: ASTNodeTypes.HorizontalRule,
    // inline block
    text: ASTNodeTypes.Str,
    break: ASTNodeTypes.Break,
    emphasis: ASTNodeTypes.Emphasis,
    strong: ASTNodeTypes.Strong,
    html: ASTNodeTypes.Html,
github textlint / textlint / packages / @textlint / text-to-ast / src / plaintext-syntax.js View on Github external
// LICENSE : MIT
"use strict";
const { ASTNodeTypes } = require("@textlint/ast-node-types");
const exports = {
    Document: ASTNodeTypes.Document, // must
    Paragraph: ASTNodeTypes.Paragraph,
    // inline
    Str: ASTNodeTypes.Str, // must
    Break: ASTNodeTypes.Break // must
};
module.exports = exports;
github textlint / textlint / packages / @textlint / text-to-ast / src / plaintext-syntax.js View on Github external
// LICENSE : MIT
"use strict";
const { ASTNodeTypes } = require("@textlint/ast-node-types");
const exports = {
    Document: ASTNodeTypes.Document, // must
    Paragraph: ASTNodeTypes.Paragraph,
    // inline
    Str: ASTNodeTypes.Str, // must
    Break: ASTNodeTypes.Break // must
};
module.exports = exports;
github textlint / textlint / packages / @textlint / markdown-to-ast / src / mapping / markdown-syntax-map.js View on Github external
// LICENSE : MIT
"use strict";
const { ASTNodeTypes } = require("@textlint/ast-node-types");
const exports = {
    root: ASTNodeTypes.Document,
    paragraph: ASTNodeTypes.Paragraph,
    blockquote: ASTNodeTypes.BlockQuote,
    listItem: ASTNodeTypes.ListItem,
    list: ASTNodeTypes.List,
    Bullet: "Bullet", // no need?
    heading: ASTNodeTypes.Header,
    code: ASTNodeTypes.CodeBlock,
    HtmlBlock: ASTNodeTypes.HtmlBlock,
    ReferenceDef: ASTNodeTypes.ReferenceDef,
    thematicBreak: ASTNodeTypes.HorizontalRule,
    // inline block
    text: ASTNodeTypes.Str,
    break: ASTNodeTypes.Break,
    emphasis: ASTNodeTypes.Emphasis,
    strong: ASTNodeTypes.Strong,
    html: ASTNodeTypes.Html,
    link: ASTNodeTypes.Link,
github textlint / textlint / packages / @textlint / markdown-to-ast / src / mapping / markdown-syntax-map.js View on Github external
"use strict";
const { ASTNodeTypes } = require("@textlint/ast-node-types");
const exports = {
    root: ASTNodeTypes.Document,
    paragraph: ASTNodeTypes.Paragraph,
    blockquote: ASTNodeTypes.BlockQuote,
    listItem: ASTNodeTypes.ListItem,
    list: ASTNodeTypes.List,
    Bullet: "Bullet", // no need?
    heading: ASTNodeTypes.Header,
    code: ASTNodeTypes.CodeBlock,
    HtmlBlock: ASTNodeTypes.HtmlBlock,
    ReferenceDef: ASTNodeTypes.ReferenceDef,
    thematicBreak: ASTNodeTypes.HorizontalRule,
    // inline block
    text: ASTNodeTypes.Str,
    break: ASTNodeTypes.Break,
    emphasis: ASTNodeTypes.Emphasis,
    strong: ASTNodeTypes.Strong,
    html: ASTNodeTypes.Html,
    link: ASTNodeTypes.Link,
    image: ASTNodeTypes.Image,
    inlineCode: ASTNodeTypes.Code,
    delete: ASTNodeTypes.Delete,
    // remark(markdown) extension
    // Following type is not in @textlint/ast-node-types
    yaml: "Yaml",
    table: "Table",
    tableRow: "TableRow",
    tableCell: "TableCell",
    linkReference: "LinkReference",
    imageReference: "imageReference",
github textlint / textlint / packages / @textlint / text-to-ast / src / plaintext-syntax.js View on Github external
// LICENSE : MIT
"use strict";
const { ASTNodeTypes } = require("@textlint/ast-node-types");
const exports = {
    Document: ASTNodeTypes.Document, // must
    Paragraph: ASTNodeTypes.Paragraph,
    // inline
    Str: ASTNodeTypes.Str, // must
    Break: ASTNodeTypes.Break // must
};
module.exports = exports;
github textlint / textlint / packages / txt-to-ast / lib / plaintext-syntax.js View on Github external
// LICENSE : MIT
"use strict";

var _require = require("@textlint/ast-node-types"),
    ASTNodeTypes = _require.ASTNodeTypes;

var _exports = {
    "Document": ASTNodeTypes.Document, // must
    "Paragraph": ASTNodeTypes.Paragraph,
    // inline
    "Str": ASTNodeTypes.Str, // must
    "Break": ASTNodeTypes.Break // must
};
module.exports = _exports;
//# sourceMappingURL=plaintext-syntax.js.map
github textlint / textlint / packages / @textlint / markdown-to-ast / src / mapping / markdown-syntax-map.js View on Github external
// LICENSE : MIT
"use strict";
const { ASTNodeTypes } = require("@textlint/ast-node-types");
const exports = {
    root: ASTNodeTypes.Document,
    paragraph: ASTNodeTypes.Paragraph,
    blockquote: ASTNodeTypes.BlockQuote,
    listItem: ASTNodeTypes.ListItem,
    list: ASTNodeTypes.List,
    Bullet: "Bullet", // no need?
    heading: ASTNodeTypes.Header,
    code: ASTNodeTypes.CodeBlock,
    HtmlBlock: ASTNodeTypes.HtmlBlock,
    ReferenceDef: ASTNodeTypes.ReferenceDef,
    thematicBreak: ASTNodeTypes.HorizontalRule,
    // inline block
    text: ASTNodeTypes.Str,
    break: ASTNodeTypes.Break,
    emphasis: ASTNodeTypes.Emphasis,
    strong: ASTNodeTypes.Strong,
    html: ASTNodeTypes.Html,
    link: ASTNodeTypes.Link,
    image: ASTNodeTypes.Image,