mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-01 01:38:07 +08:00
This also adds Python-2.0 to the list of accepted licenses. Lastly, it fixes a bug where the package.json files were incorrectly reordered. For the `exports` of a particular package, the order that the entrypoints are defined in is crucial. Therefore, we should not alter the order of entrypoints and instead maintain the originally defined ordering. We can use an `OrderedDict` to ensure that Python always loads the JSON files in the same order. DISABLE_THIRD_PARTY_CHECK=NPM update R=jacktfranklin@chromium.org Bug: none Change-Id: I5a309782de6015edea6ba3b502aa0db1f008d973 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2692909 Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org> Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
mdast-util-to-string
mdast utility to get the plain text content of a node.
Install
npm:
npm install mdast-util-to-string
Use
var unified = require('unified')
var parse = require('remark-parse')
var toString = require('mdast-util-to-string')
var tree = unified()
.use(parse)
.parse('Some _emphasis_, **importance**, and `code`.')
console.log(toString(tree)) // => 'Some emphasis, importance, and code.'
API
toString(node)
Get the text content of a node or list of nodes.
The algorithm checks value of node, then alt, and finally title.
If no value is found, the algorithm checks the children of node and joins them
(without spaces or newlines).
This is not a markdown to plain-text library. Use
strip-markdownfor that.
Security
Use of mdast-util-to-string does not involve hast, user content, or
change the tree, so there are no openings for cross-site scripting (XSS)
attacks.
Related
nlcst-to-string— Get text content in nlcsthast-util-to-string— Get text content in hasthast-util-to-text— Get text content in hast according to theinnerTextalgorithmhast-util-from-string— Set text content in hast
Contribute
See contributing.md in syntax-tree/.github for ways to get
started.
See support.md for ways to get help.
This project has a code of conduct. By interacting with this repository, organization, or community you agree to abide by its terms.