asciidoctor-lfet

1.1.0 • Public • Published

Asciidoctor LFET Extension

Build status npm version

A set of macros for Asciidoctor.js to integrate lohrfink decision tables in your AsciiDoc based documentation!

Install

Node.js

Install the dependencies:

npm i asciidoctor asciidoctor-lfet

Create a file named lfet.js with following content and run it:

const asciidoctor = require('@asciidoctor/core')()
const lfet = require('asciidoctor-lfet')

const input = 'dt::smallestDecisionTable.lfet[]'

lfet.register(asciidoctor.Extensions) // <1>
console.log(asciidoctor.convert(input, { safe: 'safe' }))

const registry = asciidoctor.Extensions.create()
lfet.register(registry) // <2>
console.log(asciidoctor.convert(input, { safe: 'safe', extension_registry: registry }))

<1> Register the extension in the global registry

<2> Register the extension in a dedicated registry

Block macro

Antora

AsciiDoc source

dt::example$smallestDecisionTable.lfet[]

AsciiDoc generated

R01 R02
C01 Condition 1 Y N
A01 Action 1 X -
A02 Action 2 - X

Dependencies (1)

Dev Dependencies (14)

Package Sidebar

Install

npm i asciidoctor-lfet

Weekly Downloads

0

Version

1.1.0

License

MIT

Unpacked Size

11.6 kB

Total Files

6

Last publish

Collaborators

  • uniqueck