Skip to content

Commit

Permalink
Merge pull request #1 from karimatthews/minor-bugfixes
Browse files Browse the repository at this point in the history
Minor bugfixes
  • Loading branch information
karimatthews authored Feb 11, 2019
2 parents 2891df7 + 52bee3c commit f780dbe
Show file tree
Hide file tree
Showing 9 changed files with 863 additions and 364 deletions.
5 changes: 0 additions & 5 deletions Makefile

This file was deleted.

32 changes: 23 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
# 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.

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.

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

```sh
npm install @kmatthews/jira2md
```

## Supported Conversions

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

* Headers (H1-H6)
Expand All @@ -34,14 +39,13 @@ NOTE: All conversion work bi-directionally (from jira to markdown and back again
* 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.

```
```md
**Some bold things**
*Some italic stuff*
## H2
Expand All @@ -52,7 +56,7 @@ We'll refer to this as the `md` variable in the examples below.

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

```
```jira
*Some bold things**
_Some italic stuff_
h2. H2
Expand All @@ -63,9 +67,9 @@ h2. H2

```javascript
// Include the module
var j2m = require('jira2md');
var j2m = require('jira2md'); or import jira2md from 'jira2md';

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

// If converting from Jira Wiki Syntax to Markdown:
Expand All @@ -77,3 +81,13 @@ 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.
Loading

0 comments on commit f780dbe

Please sign in to comment.