Skip to content

gaurav-nelson/asciidoc-xref-extractor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

asciidoc-xref-extractor

Extracts all unique xrefs from asciidoc files.

Installation

npm install --save asciidoc-xref-extractor

API

asciidocXrefExtractor(asciidocFile)

Parameters:

  • asciidocFile is a string in asciidoc format.

Returns:

  • an array containing all unique xrefs from the file.

Example Usage

"use strict";

var fs = require('fs');
var asciidocXrefExtractor = require(asciidoc-xref-extractor);

var asciidocFile = fs.readFileSync("./test.adoc").toString();

var xrefs = asciidocXrefExtractor(asciidocFile);

xrefs.forEach(function (xref) {
    console.log(xref);
});

About

Extract all unique xrefs from asciidoc files.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published