You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constasciidoctor=require('asciidoctor')()constregistry=asciidoctor.Extensions.create()// register the extensionconstmetadataPostProcessorExtension=require('./metadata-postprocessor.js')metadataPostProcessorExtension(registry)// convert text using the extension registryasciidoctor.convert('text',{'extension_registry': registry})
The text was updated successfully, but these errors were encountered:
The condition
if (rawHtml === "")
is always false since we prepend HTML to the variablerawHtml
:graphgist-portal-v3/api/src/graphgists/utils.js
Lines 96 to 104 in 20efc9c
As a result, the
ValidationError
will never be thrown.Furthermore, it would be better to use an Asciidoctor Postprocessor extension to prepend content: https://docs.asciidoctor.org/asciidoctor/latest/extensions/postprocessor/
Here's an example (untested code):
metadata-postprocessor.js
And then you can register this extension:
The text was updated successfully, but these errors were encountered: