asciidoctor/asciidoctor.js

Asciidoctor.js should automatically add aliases if they are missing on the converter given as option to processor.convert method

marieflorescontact opened this issue · 0 comments

Hi 👋,
I’m trying to use the processor.convert method like this:

const asciidoctor = require('@asciidoctor/core')
const processor = asciidoctor()
const html = processor.convert(input, { converter: myConverter })

I had an error because the converter I use as option has not been generated by Opal so it didn't have the alias method $convert :

TypeError: self.converter.$convert is not a function

I had to add it to my converter manually.
Don't you think that it would be nice if Asciidoctor.js added the alias itself?