markdown-it-expand-tabs

WebJar for markdown-it-expand-tabs

License

License

ISC
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

markdown-it-expand-tabs
Last Version

Last Version

1.0.13
Release Date

Release Date

Type

Type

jar
Description

Description

markdown-it-expand-tabs
WebJar for markdown-it-expand-tabs
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/revin/markdown-it-expand-tabs

Download markdown-it-expand-tabs

How to add to project

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

Dependencies

compile (1)

Group / Artifact Type Version
org.webjars.npm : lodash.repeat jar [4.0.0,5)

Project Modules

There are no modules declared in this project.

markdown-it-expand-tabs

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

Greenkeeper badge Build Status Code Climate

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

npm install markdown-it-expand-tabs

Usage

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

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:

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

Tests

npm install
npm test

License

ISC

Versions

Version
1.0.13