# @advanced-rest-client/highlight

> A set of tools to work with markdown content and other syntax highlighting.

Latest version **2.0.2** (published 2022-03-02) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @advanced-rest-client/highlight
pnpm add @advanced-rest-client/highlight
yarn add @advanced-rest-client/highlight
bun add @advanced-rest-client/highlight
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.2 |
| Published | 2022-03-02 |
| First published | 2021-06-12 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 9 |
| Unpacked size | 139.9 KB |
| Known vulnerabilities | 0 (+16 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Pawel Uchida-Psztyc |
| Maintainers | jarrodek, twoplustwoone, lbauret, carowright |
| Keywords | web-components, marked |

## Links

- npm: https://www.npmjs.com/package/@advanced-rest-client/highlight
- Repository: https://github.com/advanced-rest-client/highlight
- Homepage: https://github.com/advanced-rest-client/highlight#readme
- Issues: https://github.com/advanced-rest-client/highlight/issues
- npm.io page: https://npm.io/package/@advanced-rest-client/highlight

## Dependencies (9)

- [marked](https://npm.io/package/marked.md) ^4.0.12
- [prismjs](https://npm.io/package/prismjs.md) ^1.25.0
- [lit-html](https://npm.io/package/lit-html.md) ^1.4.1
- [dompurify](https://npm.io/package/dompurify.md) ^2.3.3
- [lit-element](https://npm.io/package/lit-element.md) ^2.5.1
- [@pawel-up/html.md](https://npm.io/package/@pawel-up/html.md.md) ^0.1.0
- [@advanced-rest-client/icons](https://npm.io/package/@advanced-rest-client/icons.md) ^4.0.0
- [@advanced-rest-client/events](https://npm.io/package/@advanced-rest-client/events.md) ^0.2.22
- [@anypoint-web-components/awc](https://npm.io/package/@anypoint-web-components/awc.md) ^1.0.3

## Alternatives

- [@mdxeditor/editor](https://npm.io/package/@mdxeditor/editor.md) — 962.4K weekly downloads
- [mmdb-lib](https://npm.io/package/mmdb-lib.md) — 680.9K weekly downloads
- [playcanvas](https://npm.io/package/playcanvas.md) — 36.2K weekly downloads
- [@glw907/cairn-cms](https://npm.io/package/@glw907/cairn-cms.md) — 967 weekly downloads
- [markdown-to-confluence](https://npm.io/package/markdown-to-confluence.md) — 103 weekly downloads

## Recent versions

- 2.0.2 (latest) — 2022-03-02
- 2.0.1 — 2021-10-19
- 2.0.0 — 2021-10-19
- 1.1.1 — 2021-06-27
- 1.1.0 — 2021-06-27
- 1.0.0 — 2021-06-12

## README

# highlight

A set of tools to work with markdown content and other syntax highlighting.

This library replaces the old modules of:

- @advanced-rest-client/markdown-styles
- @advanced-rest-client/arc-marked
- @advanced-rest-client/prism-highlight

[![Published on NPM](https://img.shields.io/npm/v/@advanced-rest-client/highlight.svg)](https://www.npmjs.com/package/@advanced-rest-client/highlight)

[![Tests and publishing](https://github.com/advanced-rest-client/highlight/actions/workflows/deployment.yml/badge.svg)](https://github.com/advanced-rest-client/highlight/actions/workflows/deployment.yml)

## Usage

### Installation

```sh
npm install --save @advanced-rest-client/highlight
```

### MarkdownStyles

This should be used whenever the `arc-marked` is used.

```javascript
import { MarkdownStyles } from '@advanced-rest-client/highlight';

export default class AnElement extends LitElement {
  get styles() {
    return [
      MarkdownStyles,
      css`
        ...
      `
    ];
  }
  ...
}
```

### arc-marked

An element that specializes in markdown rendering.

```html
<arc-marked markdown="***Bold and italic***">
  <div slot="markdown-html" class="markdown-html custom"></div>
</arc-marked>
```

```html
<arc-marked>
  <div slot="markdown-html"></div>
  <script type="text/markdown">
    ## Markdown Renderer

    ...
  </script>
</arc-marked>
```

## Development

```sh
git clone https://github.com/advanced-rest-client/arc-headers
cd arc-headers
npm install
```

### Running the demo locally

```sh
npm start
```

### Running the tests

```sh
npm test
```

---
_Source: https://npm.io/package/@advanced-rest-client/highlight · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
