An open API service indexing awesome lists of open source software.

https://github.com/codebytere/github-issue-parser

parse github issue templates
https://github.com/codebytere/github-issue-parser

Last synced: 5 months ago
JSON representation

parse github issue templates

Awesome Lists containing this project

README

          

# GitHub Issue Parser

This module parses github issue templates from markdown into plain JavaScript objects. It understands both markdown headers and list items.

Example:

```md
* **Version**: 1.2.3
* **Operating System:** Mac

## Actual Behavior

some bad behavior

## Expected Behavior

some good behavior
```

```js
const issueParser = require('github-issue-parser')

const issueData = fs.readFileSync('/path/to/issue.md', 'utf8')
const jsonBlob = issueParser(issueData)
console.log(jsonBlob)
/*
{
'Version:': { raw: '1.2.3', html: '1.2.3' },
'Operating System:': { raw: 'Mac', html: 'Mac },
'Actual Behavior': {
raw: 'some bad behavior',
html: '

some bad behavior

'
},
'Expected Behavior': {
raw: 'some good behavior',
html: '

some good behavior

'
},
}
*/
```