Unverified Commit 8703f134 authored by Aleksander's avatar Aleksander Committed by GitHub

Fix awaiting for sync method of remark in cms examples (#15555)

parent c6429993
...@@ -2,6 +2,6 @@ import remark from 'remark' ...@@ -2,6 +2,6 @@ import remark from 'remark'
import html from 'remark-html' import html from 'remark-html'
export default async function markdownToHtml(markdown) { export default async function markdownToHtml(markdown) {
const result = await remark().use(html).processSync(markdown) const result = await remark().use(html).process(markdown)
return result.toString() return result.toString()
} }
...@@ -2,6 +2,6 @@ import remark from 'remark' ...@@ -2,6 +2,6 @@ import remark from 'remark'
import html from 'remark-html' import html from 'remark-html'
export default async function markdownToHtml(markdown) { export default async function markdownToHtml(markdown) {
const result = await remark().use(html).processSync(markdown) const result = await remark().use(html).process(markdown)
return result.toString() return result.toString()
} }
...@@ -2,6 +2,6 @@ import remark from 'remark' ...@@ -2,6 +2,6 @@ import remark from 'remark'
import html from 'remark-html' import html from 'remark-html'
export default async function markdownToHtml(markdown) { export default async function markdownToHtml(markdown) {
const result = await remark().use(html).processSync(markdown) const result = await remark().use(html).process(markdown)
return result.toString() return result.toString()
} }
...@@ -2,6 +2,6 @@ import remark from 'remark' ...@@ -2,6 +2,6 @@ import remark from 'remark'
import html from 'remark-html' import html from 'remark-html'
export default async function markdownToHtml(markdown) { export default async function markdownToHtml(markdown) {
const result = await remark().use(html).processSync(markdown) const result = await remark().use(html).process(markdown)
return result.toString() return result.toString()
} }
...@@ -2,6 +2,6 @@ import remark from 'remark' ...@@ -2,6 +2,6 @@ import remark from 'remark'
import html from 'remark-html' import html from 'remark-html'
export default async function markdownToHtml(markdown) { export default async function markdownToHtml(markdown) {
const result = await remark().use(html).processSync(markdown) const result = await remark().use(html).process(markdown)
return result.toString() return result.toString()
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment