Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor bugfixes #1

Merged
merged 29 commits into from
Feb 11, 2019
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
1d0b516
Add dependencies for running tests
karimatthews Jan 25, 2019
5db078b
Prefer const to var
karimatthews Jan 25, 2019
dc595d3
Fis whitespace check on strikethrough
karimatthews Jan 25, 2019
5d1a334
Use 2 spaces for indenting
karimatthews Jan 25, 2019
a362c4d
Comment out citation test
karimatthews Jan 25, 2019
b54b65d
Standardize formatting
karimatthews Jan 25, 2019
72db65b
Use let rather than const where appropriate
karimatthews Jan 25, 2019
eb0574a
Fix markdown to jira strikethrough
karimatthews Jan 25, 2019
9c23abe
Do not transform intra-word underscores
karimatthews Jan 28, 2019
01dcad8
Do not transform intra-word asterisks
karimatthews Jan 28, 2019
666902e
Remove citation from example blob to fix integration test
karimatthews Jan 28, 2019
bfbb62f
Prevent intra-word formatting in the markdown to jira direction
karimatthews Jan 29, 2019
dfc0842
Handle multpile sections of bold and italic in a string
karimatthews Jan 30, 2019
6d5a683
Handle multiple codeblocks in the jira to markdown direction
karimatthews Jan 30, 2019
063881e
Fix tests to expect that formating should not be applied within codeb…
karimatthews Jan 30, 2019
b20731b
Handle edge cases for bold and italic formatting
karimatthews Jan 30, 2019
15bec6e
Use nested describe blocks to make tests clearer
karimatthews Jan 30, 2019
049bb24
Add an underscore in front of unused arguments
karimatthews Jan 31, 2019
3ddc49f
Get rid of Makefile
karimatthews Jan 31, 2019
d33e6c6
Add FAQ section to README
karimatthews Feb 1, 2019
9c6b3f0
Add unit test for md2jira multiple codeblocks
karimatthews Feb 1, 2019
f57a723
Remove unnecessary comment
karimatthews Feb 5, 2019
34c2402
Improve emphasis formatting from markdown to Jira
karimatthews Jan 31, 2019
e4dc581
Add unit tests for urls and emails
karimatthews Jan 31, 2019
45ae23f
Prevent further formatting being performed within codeblocks and nofo…
karimatthews Feb 1, 2019
bb7e535
Update package.json
karimatthews Feb 1, 2019
ba96528
Make J2M a 'Class' for readability
karimatthews Feb 11, 2019
69be386
Remove stale code
karimatthews Feb 11, 2019
52bee3c
Require a specific direction when transforming MD
karimatthews Feb 11, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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