npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@kmatthews/jira2md

v2.0.4

Published

JIRA to MarkDown text format converter.

Downloads

81

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. Major credit to Fokke (and other contributors) for establishing a lot of the fundamental RexExp patterns for this module to work.

Installation

npm install @kmatthews/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
  • 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
var j2m = require('jira2md'); or import jira2md from 'jira2md';

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

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

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

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

Running tests

You can run yarn test or npm test

FAQ

Q. Why doesn't this module support conversion of inline markdown?

A. Jira doesn't support inline code formatting, so the best we can do is to keep the backticks in place.