# markdown-it-expand-tabs

> A markdown-it plugin to replace leading tabs with spaces in code blocks

Latest version **1.0.13** (published 2018-03-06) · ISC license · 0 weekly downloads

## Install

```sh
npm install markdown-it-expand-tabs
pnpm add markdown-it-expand-tabs
yarn add markdown-it-expand-tabs
bun add markdown-it-expand-tabs
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.13 |
| Published | 2018-03-06 |
| First published | 2016-01-22 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 7.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Revin Guillen |
| Maintainers | revin |
| Keywords | markdown, markdown-it, markdown-it-plugin, spaces, tabs, retab, expand, code |

## Links

- npm: https://www.npmjs.com/package/markdown-it-expand-tabs
- Repository: https://github.com/revin/markdown-it-expand-tabs
- Homepage: https://github.com/revin/markdown-it-expand-tab#readme
- Issues: https://github.com/revin/markdown-it-expand-tab/issues
- npm.io page: https://npm.io/package/markdown-it-expand-tabs

## Dependencies (1)

- [lodash.repeat](https://npm.io/package/lodash.repeat.md) ^4.0.0

## Alternatives

- [flatbuffers](https://npm.io/package/flatbuffers.md) — 6.0M weekly downloads
- [jwt-simple](https://npm.io/package/jwt-simple.md) — 259.5K weekly downloads
- [@exodus/patch-broken-hermes-typed-arrays](https://npm.io/package/@exodus/patch-broken-hermes-typed-arrays.md) — 28.5K weekly downloads
- [@native-to-anchor/buffer-layout](https://npm.io/package/@native-to-anchor/buffer-layout.md) — 12.2K weekly downloads
- [binary-parser-encoder](https://npm.io/package/binary-parser-encoder.md) — 5.3K weekly downloads

## Recent versions

- 1.0.13 (latest) — 2018-03-06
- 1.0.12 — 2017-05-02
- 1.0.11 — 2016-06-22
- 1.0.10 — 2016-05-20
- 1.0.9 — 2016-03-25
- 1.0.8 — 2016-03-25
- 1.0.7 — 2016-01-23
- 1.0.6 — 2016-01-23
- 1.0.5 — 2016-01-23
- 1.0.4 — 2016-01-23
- 1.0.3 — 2016-01-23
- 1.0.2 — 2016-01-22
- 1.0.1 — 2016-01-22
- 1.0.0 — 2016-01-22

## README

# markdown-it-expand-tabs

A [markdown-it](https://www.npmjs.com/package/markdown-it) plugin to replace leading tabs with spaces in code blocks

[![Greenkeeper badge](https://badges.greenkeeper.io/revin/markdown-it-expand-tabs.svg)](https://greenkeeper.io/)
[![Build Status](https://travis-ci.org/revin/markdown-it-expand-tabs.svg?branch=master)](https://travis-ci.org/revin/markdown-it-expand-tabs)
[![Code Climate](https://codeclimate.com/github/revin/markdown-it-expand-tabs/badges/gpa.svg)](https://codeclimate.com/github/revin/markdown-it-expand-tabs)

## What it does

- Replaces leading tabs with spaces in fenced code blocks
- Nothing else

### Why is this useful?

Say you have tab-indented code in a markdown file and you want the rendered code to
take up less visual space horizontally. This plugin will help. If you're not in that
situation, then this plugin probably isn't for you.

## Installation

```sh
npm install markdown-it-expand-tabs
```

## Usage

Use it the same as a normal markdown-it plugin:

```js
var md = require('markdown-it');
var expandTabs = require('markdown-it-expand-tabs');

var parser = md().use(expandTabs);

var result = parser.render(...); // markdown string containing tab-indented code blocks
```

The default behavior is to convert leading tabs into two spaces each. You can choose
an alternate tab width thusly:

```js
var parser = md().use(expandTabs, {tabWidth: 4});
```

## Tests

```sh
npm install
npm test
```

## License

ISC

---
_Source: https://npm.io/package/markdown-it-expand-tabs · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
