1.0.10 • Published 7 years ago

@hammad.fauz/parser v1.0.10

Weekly downloads
61
License
MIT
Repository
github
Last release
7 years ago

@hammad.fauz/parser

fork of @bbob/parser

Parses BBCode and returns array AST tree

Valid for use with posthtml-render

Usage

import parse from '@hammad.fauz/parser'

const options = {
    onlyAllowTags: ['url', 'h'],
    onError: (err) => console.warn(err.message, err.lineNumber, err.columnNumber)
}
const ast = parse('[url=https://github.com]hello world![/url]', options)

Results

[
    {
        "tag": "url",
        "attrs": {
            "url": "https://github.com"
        },
        "content": ["hello", " ", "world!"]
    }
]
1.0.10

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago