2.0.2 • Published 2 years ago

@textlint-rule/tokenize-htmltext v2.0.2

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
2 years ago

@textlint-rule/tokenize-htmltext

Tokenize an html string into a list of text tokens, it keeps reference to indexes in the original string.

Installation

$ npm install @textlint-rule/tokenize-htmltext

Usage

var tokenizeHTML = require('@textlint-rule/tokenize-htmltext');


var tokens = tokenizeHTML('<b>hello</b> world');

/*
[ { value: 'hello', index: 3, offset: 5 },
  { value: ' world', index: 12, offset: 6 } ]
*/
2.0.2

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago