Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@ggrossetie
Copy link
Member

It can be useful when you want both the Asciidoctor.Document and the result in a single call:

const data = []
const writableStream = new Writable({
  write (chunk, encoding, callback) {
    data.push(chunk.toString())
    callback()
  }
})
const doc = asciidoctor.convert(text, { to_file: writableStream, safe: safe })
const html = data.join('')

@ggrossetie ggrossetie merged commit 99ba4c5 into asciidoctor:main Mar 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant