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

https://github.com/centerforopenscience/markdown-it-atrules


https://github.com/centerforopenscience/markdown-it-atrules

Last synced: 10 days ago
JSON representation

Awesome Lists containing this project

README

          

# markdown-it-atrules
# Work in progess

> markdown-it plugin for embedding MFR files.

## Usage

```js
md = require('markdown-it')({
html: true,
linkify: true,
typography: true,
}).use(require('../'), {
type: 'osf',
pattern: /^http(?:s?):\/\/(?:www\.)?[a-zA-Z0-9 .:]{1,}\/render\?url=http(?:s?):\/\/[a-zA-Z0-9 .:]{1,}\/([a-zA-Z0-9]{5})\/\?action=download|(^[a-zA-Z0-9]{5}$)/,
format(assetID) {
var id = '__markdown-it-atrules-' + (new Date()).getTime();
return '

' +
'$(document).ready(function () {new mfr.Render("' + id + '", "' + getMfrUrl(assetID) + '"); }); ';
}
```