Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

jira2md

kylefarris54kApache-2.03.0.1

JIRA to MarkDown text format converter.

jira, atlassian, wiki, markdown

readme

jira2md

JIRA to MarkDown text format converter

Convert from JIRA text formatting to GitHub Flavored MarkDown and back again. Also allows for both to be converted to HTML.

Credits

This module was heavily inspired by the J2M project by Fokke Zandbergen (http://j2m.fokkezb.nl/). Major credit to Fokke (and other contributors) for establishing a lot of the fundamental RexExp patterns for this module to work.

Installation

npm install jira2md

Supported Conversions

NOTE: All conversion work bi-directionally (from jira to markdown and back again).

  • Headers (H1-H6)
  • Bold
  • Italic
  • Bold + Italic
  • Un-ordered lists
  • Ordered lists (with help from aarbanas)
  • Programming Language-specific code blocks (with help from herbert-venancio)
  • Inline preformatted text spans
  • Un-named links
  • Named links
  • Monospaced Text
  • Citations (Removed in 2.0.0)
  • Strikethroughs
  • Inserts
  • Superscripts
  • Subscripts
  • Single-paragraph blockquotes
  • Tables (thanks to erykwarren)
  • Panels (thanks to erykwarren)

How to Use

Markdown String

We'll refer to this as the md variable in the examples below.

**Some bold things**
*Some italic stuff*
## H2
<http://google.com>

Atlassian Wiki Syntax

We'll refer to this as the jira variable in the examples below.

*Some bold things**
_Some italic stuff_
h2. H2
[http://google.com]

Examples

// Include the module
const j2m = require('jira2md');

// If converting from Mardown to Jira Wiki Syntax:
const jira = j2m.to_jira(md);

// If converting from Jira Wiki Syntax to Markdown:
const md = j2m.to_markdown(jira);

// If converting from Markdown to HTML:
const html = j2m.md_to_html(md);

// If converting from JIRA Wiki Syntax to HTML:
const html = j2m.jira_to_html(jira);

changelog

Changes

This file is a manually maintained list of changes for each release. Feel free to add your changes here when sending pull requests. Also send corrections if you spot any mistakes.

1.4.0

  • Initial public release

1.5.0 (2016-01-29)

  • Additional features added: tables and panels.
  • Color is now stripped when converting from jira to markdown as standard markdown does not support color.

2.0.0 (2016-07-07)

  • Removed citations due to a bug

2.0.2 (2017-08-22)

  • Fixed a bug in how titled code blocks were rendered

2.0.3 (2017-09-15)

  • Fixed a bug where dashes were being converted to strike throughs in situations they shouldn't have been. Before the fix, the string "ABC-1234 and DEF-5678" would have been converted to (HTML): "ABC1234 and DEV5678" or (Markdown): "ABC1234 and DEV5678" which is invalid. After the fix, no strikethroughs will be added to the converted output unless there is at least 1 space before the first dash (or double tilde) and after the last dash (or double tilde).

NOTE: All versions from here, refer to Releases page on github