Skip to content

gaurav-nelson/asciidoc-reference-check

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

apm apm apm

asciidoc-reference-check

Check if the internal and external references in asciidoc files are valid.

An atom package for checking internal(xref) and external(link) references:

  • in the current file opened in the Atom editor.
  • in an asciidoc file of the Atom tree view
  • in a folder of the Atom tree view (in this case all .adoc files in the folder are checked recursively)

See Inline Anchor section in Asciidoc syntax quick reference.

How to use

  • In the Atom editor:
    1. Open any .adoc file.
    2. Either right click in the editor window and select Check References option, or click Ctrl+Alt+l.
  • In the Atom tree view
    1. Right click an .adoc file or a folder and select Check References option.

If there are any errors, they are shown as notifications.

Features

  • Checks for duplicate anchors in a file.
  • For internal references, it checks if anchors exist in current document.
  • For external references to local files:
    • checks if the file exist.
    • in case the reference point to an anchor, checks if that anchor exists.
  • For hyperlinks, check if the target is reachable.

Supported Anchors and References

  • Anchors:
    • standard anchors: [[anchor]] and [[anchor, description]]
    • bibliography anchors: * [[[anchor]]] or * [[[anchor, description]]]
    • inline anchors: [#anchorname] and anchor:anchorname[description]
  • References:
    • Internal references: <<anchorname>> or <<anchorname, description>>
    • External references to .adoc files:
      • <<path/to/file.adoc>>, <<path/to/file.adoc#section>>, <<path/to/file#section>> or with an additional description (e.g. <<path/to/file.adoc, description>>)
      • xref:path/to/file.adoc[description]
    • External references to other types of files: link:path/to/file[description]
    • Hyperlinks using the link: macro (e.g. link:URI[description]) or without: http://www.google.com

Contributors

Gaurav Nelson and Julien Pfefferkorn

About

Atom package to check if all the references in the current document are valid.

Resources

License

Stars

Watchers

Forks

Packages

No packages published