Compare commits
2 Commits
5304e20c94
...
873aefcc6c
Author | SHA1 | Date | |
---|---|---|---|
873aefcc6c | |||
5f5cd286e7 |
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@doc-utils/markdown2html",
|
"name": "@doc-utils/markdown2html",
|
||||||
"version": "0.2.5",
|
"version": "0.2.6",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@doc-utils/markdown2html",
|
"name": "@doc-utils/markdown2html",
|
||||||
"version": "0.2.5",
|
"version": "0.2.6",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bytefield-svg": "^1.6.1",
|
"bytefield-svg": "^1.6.1",
|
||||||
"dompurify": "^2.3.6",
|
"dompurify": "^2.3.6",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@doc-utils/markdown2html",
|
"name": "@doc-utils/markdown2html",
|
||||||
"version": "0.2.5",
|
"version": "0.2.6",
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"registry": "https://gitea.home.jbrumond.me/api/packages/doc-utils/npm/"
|
"registry": "https://gitea.home.jbrumond.me/api/packages/doc-utils/npm/"
|
||||||
},
|
},
|
||||||
|
@ -27,6 +27,7 @@ export interface MarkdownExtension {
|
|||||||
|
|
||||||
export async function render_markdown_to_html(markdown: string, options: MarkdownOptions = { }) {
|
export async function render_markdown_to_html(markdown: string, options: MarkdownOptions = { }) {
|
||||||
const marked_options = marked_opts(options);
|
const marked_options = marked_opts(options);
|
||||||
|
setup_marked(options, marked_options);
|
||||||
const unsafe_html = options.inline
|
const unsafe_html = options.inline
|
||||||
? marked.parseInline(markdown, marked_options)
|
? marked.parseInline(markdown, marked_options)
|
||||||
: marked.parse(markdown, marked_options);
|
: marked.parse(markdown, marked_options);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user