@cloudflare/util-markdown
Advanced tools
Comparing version 1.0.8 to 1.0.9
@@ -6,3 +6,11 @@ # Change Log | ||
<a name="1.0.8"></a> | ||
<a name="1.0.9"></a> | ||
## [1.0.9](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/util-markdown@1.0.8...@cloudflare/util-markdown@1.0.9) (2018-09-21) | ||
**Note:** Version bump only for package @cloudflare/util-markdown | ||
<a name="1.0.8"></a> | ||
## [1.0.8](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/util-markdown@1.0.7...@cloudflare/util-markdown@1.0.8) (2018-06-14) | ||
@@ -15,3 +23,3 @@ | ||
<a name="1.0.7"></a> | ||
<a name="1.0.7"></a> | ||
@@ -18,0 +26,0 @@ ## [1.0.7](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/util-markdown@1.0.4...@cloudflare/util-markdown@1.0.7) (2018-06-07) |
import markdown from './markdown'; | ||
export default markdown; |
import marked from 'marked'; | ||
import memoize from 'lodash.memoize'; | ||
import memoize from 'lodash.memoize'; // Setup default options. | ||
// Setup default options. | ||
marked.setOptions({ | ||
@@ -9,9 +8,6 @@ tables: false, | ||
smartypants: true, | ||
// Never turn this to `false` or you are fired. | ||
sanitize: true | ||
}); | ||
var memoizedMarked = memoize(marked); | ||
/** | ||
@@ -24,2 +20,3 @@ * Render a markdown string as html. | ||
*/ | ||
function markdown(str, opts) { | ||
@@ -26,0 +23,0 @@ var markedOpts = {}; |
@@ -1,2 +0,2 @@ | ||
'use strict'; | ||
"use strict"; | ||
@@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", { | ||
}); | ||
exports.default = void 0; | ||
var _markdown = require('./markdown'); | ||
var _markdown = _interopRequireDefault(require("./markdown")); | ||
var _markdown2 = _interopRequireDefault(_markdown); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
exports.default = _markdown2.default; | ||
var _default = _markdown.default; | ||
exports.default = _default; |
@@ -1,2 +0,2 @@ | ||
'use strict'; | ||
"use strict"; | ||
@@ -6,19 +6,15 @@ Object.defineProperty(exports, "__esModule", { | ||
}); | ||
exports.default = void 0; | ||
var _marked = require('marked'); | ||
var _marked = _interopRequireDefault(require("marked")); | ||
var _marked2 = _interopRequireDefault(_marked); | ||
var _lodash = _interopRequireDefault(require("lodash.memoize")); | ||
var _lodash = require('lodash.memoize'); | ||
var _lodash2 = _interopRequireDefault(_lodash); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
// Setup default options. | ||
_marked2.default.setOptions({ | ||
_marked.default.setOptions({ | ||
tables: false, | ||
breaks: true, | ||
smartypants: true, | ||
// Never turn this to `false` or you are fired. | ||
@@ -28,4 +24,3 @@ sanitize: true | ||
const memoizedMarked = (0, _lodash2.default)(_marked2.default); | ||
var memoizedMarked = (0, _lodash.default)(_marked.default); | ||
/** | ||
@@ -38,4 +33,5 @@ * Render a markdown string as html. | ||
*/ | ||
function markdown(str, opts) { | ||
const markedOpts = {}; | ||
var markedOpts = {}; | ||
@@ -47,5 +43,6 @@ if (opts) { | ||
return opts ? (0, _marked2.default)(str, markedOpts) : memoizedMarked(str); | ||
return opts ? (0, _marked.default)(str, markedOpts) : memoizedMarked(str); | ||
} | ||
exports.default = markdown; | ||
var _default = markdown; | ||
exports.default = _default; |
{ | ||
"name": "@cloudflare/util-markdown", | ||
"description": "Cloudflare Markdown Util", | ||
"version": "1.0.8", | ||
"version": "1.0.9", | ||
"main": "lib/index.js", | ||
@@ -6,0 +6,0 @@ "module": "es/index.js", |
6852