mdast-util-compact

WebJar for mdast-util-compact

Лицензия

Лицензия

MIT
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

mdast-util-compact
Последняя версия

Последняя версия

2.0.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

mdast-util-compact
WebJar for mdast-util-compact
Ссылка на сайт

Ссылка на сайт

https://www.webjars.org
Система контроля версий

Система контроля версий

https://github.com/syntax-tree/mdast-util-compact

Скачать mdast-util-compact

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/mdast-util-compact/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>mdast-util-compact</artifactId>
    <version>2.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/mdast-util-compact/
implementation 'org.webjars.npm:mdast-util-compact:2.0.1'
// https://jarcasting.com/artifacts/org.webjars.npm/mdast-util-compact/
implementation ("org.webjars.npm:mdast-util-compact:2.0.1")
'org.webjars.npm:mdast-util-compact:jar:2.0.1'
<dependency org="org.webjars.npm" name="mdast-util-compact" rev="2.0.1">
  <artifact name="mdast-util-compact" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='mdast-util-compact', version='2.0.1')
)
libraryDependencies += "org.webjars.npm" % "mdast-util-compact" % "2.0.1"
[org.webjars.npm/mdast-util-compact "2.0.1"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
org.webjars.npm : unist-util-visit jar [2.0.0,3)

Модули Проекта

Данный проект не имеет модулей.

mdast-util-compact

Build Coverage Downloads Size Sponsors Backers Chat

mdast utility to make trees compact: collapse adjacent text nodes and blockquotes.

Install

npm:

npm install mdast-util-compact

Use

var u = require('unist-builder')
var compact = require('mdast-util-compact')

var tree = u('strong', [u('text', 'alpha'), u('text', ' '), u('text', 'bravo')])

compact(tree)

console.log(tree)

Yields:

{ type: 'strong',
  children: [ { type: 'text', value: 'alpha bravo' } ] }

API

compact(tree)

Walk the tree and collapse nodes. Combines adjacent texts and collapses blockquotes.

Handles positional information properly.

Returns

The given tree.

Security

Use of mdast-util-compact does not involve hast or user content so there are no openings for cross-site scripting (XSS) attacks.

Related

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.

License

MIT © Titus Wormer

org.webjars.npm
🌲🌲🌲🌳🌲🌳🌲🌲🌲🌳🌳🌲🌲🌳🌲🌲🎄🌲🌳🌲🌲🌳🐻🌳🌳🌳🌲🌲🌳🌲🎄🌲🌳🌲🌲🌳🌳🌳

Версии библиотеки

Версия
2.0.1
1.0.4
1.0.3
1.0.2