citation-js-showdown

2.0.0 • Public • Published

citation.js-showdown

Showdown extension for Citation.js.

NPM version NPM total downloads Build Status

Install

Node.js

npm install citation-js-showdown

Browser

Download this file.

Use

Node.js

First, load showdown:

const Showdown = require('showdown')

Second, register extension:

require('citation-js-showdown')

Third, use extension in the showdown converter:

const converter = new Showdown.Converter({ extensions: ['citation.js'] })

Now you can use the converter like you normally would.

Browser

<script src="showdown.js"></script>
<script src="showdown.citation.js"></script>
<script>
  const converter = new Showdown.Converter({ extensions: ['citation.js'] })
</script> 

Now you can use the converter like you normally would.

Syntax

^[<INPUT>]

Where <INPUT> is any string that can be inputted to Cite, omitting the quotes. Arrays may not work currently, see todos.

Todo

  • Sorting based on IDs
  • Add support for ^[<AUTHOR>, <YEAR>, <TITLE>, <ETC>] syntax
  • DOI input (actually a todo for Citation.js; if support for DOI is added there, it will automatically work here, assuming I update the dependencies)
  • Work async (Citation.js will probably be at least partly async soon). Requires either:
  • Configuration
    • output options available in Citation.js (assuming we want formatted citations that's only style and language)
    • Wikipedia-style references (i.e. [1]) or following style guides (i.e. (Willighagen, 2017))

Readme

Keywords

none

Package Sidebar

Install

npm i citation-js-showdown

Weekly Downloads

7

Version

2.0.0

License

MIT

Unpacked Size

10.5 kB

Total Files

4

Last publish

Collaborators

  • larsgw