anchor.diff:  . `font`: the font face to use for the text. Defaults to `Impact`.
   . `options`: a comma separate list of flags that modify the image rendering. Currently only `noupcase` is supported which disable upper casing the labels.
   . `target` (3rd positional attribute): the basename of the file to generate. If not specified an auto-generated name will be used.
  -. `format` (4th positional attribute): the output image format. The meme extension supports `png` and `gif`.
  -
  -== Contributing
  -
  -. Fork it
  -. Create your feature branch (`git checkout -b my-new-feature`)
  -. Commit your changes (`git commit -am 'Add some feature'`)
  -. Push to the branch (`git push origin my-new-feature`)
  -. Create new Pull Request
  +. `format` (4th positional attribute): the output image format. The meme extension supports `png` and `gif`.
positive.code: BlockProcessor <|-- DiagramBlock
  DiagramBlock <|-- DitaaBlock
  DiagramBlock <|-- PlantUmlBlock
  ---------------------------------------------------------------------
  ----
  
  All the diagram blocks except `meme` support the following attributes:
  
  . `target` (1st positional attribute): the basename of the file to generate. If not specified an auto-generated name will be used.
  . `format` (2nd positional attribute): the output format. PlantUML blocks support `png`, `svg` and `txt`. Graphviz, Shaape and BlockDiag support `png` and `svg`. Ditaa only supports `png`.
  
  Once you have all of this in place and your original AsciiDoc file contains a diagram block, it's time to build it into an HTML file with Asciidoctor Diagram magic! 
  When executing Asciidoctor, you must reference the Asciidoctor Diagram library, otherwise your diagram blocks won't be recognized as such. When executing Asciidoctor from the command line, do it using the -r parameter to reference this external library:
  
  ----
  $ asciidoctor -r asciidoctor-diagram doc.adoc
  ----
  
  If you don't want to embed your diagram code in your document then you can use the diagram extension as block macros.
  The target of diagram block macro should refer to the file containing the diagram source code.
  The attributes for the block macros are the same as for the inline blocks.
  The example above in block macro form becomes
  
  ----
  plantuml::mydiagram.puml["asciidoctor-diagram-classes", "png"]
  ----
  
  === The meme extension
  
  The meme extension provides a basic 'Advice Animal' style image generator.
  It's usage is easiest to explain with an example.
  
  ----
  meme::doge.jpg[Perhaps haters...,Just hate to \\ love?]
  ----
  
  The target of the block macro tells the extension which image to use as background.
  
negative.code: = Asciidoctor Diagram
  Pepijn Van_Eeckhoudt <https://github.com/pepijnve[@pepijnve]>; Sarah White <https://github.com/graphitefriction[@graphitefriction]>
  :description: README for the Asciidoctor Diagram extension for Asciidoctor.
  :toc: preamble
  :icons: font
  :source-highlighter: coderay
  :source-language: asciidoc
  :table-caption!:
  :example-caption!:
  :figure-caption!:
  :imagesdir: ../images
  // :check: icon:check[]
  :check: x
  :uri-actdiag: http://blockdiag.com/en/actdiag/index.html
  :uri-asciidoctor-api: http://asciidoctor.org/docs/user-manual/#api
  :uri-asciidoctor-extensions: http://asciidoctor.org/docs/user-manual/#extension-points
  :uri-blockdiag: http://blockdiag.com
  :uri-ditaa: http://ditaa.sourceforge.net/
  :uri-graphviz: http://www.graphviz.org/content/dot-language
  :uri-mermaid: http://knsv.github.io/mermaid/
  :uri-nwdiag: http://blockdiag.com/en/nwdiag/index.html
  :uri-packetdiag: http://blockdiag.com/en/nwdiag/index.html
  :uri-plantuml: http://plantuml.sourceforge.net
  :uri-py-plantuml: https://code.google.com/p/asciidoc-plantuml/
  :uri-rackdiag: http://blockdiag.com/en/nwdiag/index.html
  :uri-seqdiag: http://blockdiag.com/en/seqdiag/index.html
  :uri-shaape: https://github.com/christiangoltz/shaape
  :uri-wavedrom: http://wavedrom.com
  
  Asciidoctor Diagram is a set of extensions for Asciidoctor that allow you to embed plain text diagrams inside your AsciiDoc documents.
  
  The extensions support BlockDiag (BlockDiag, SeqDiag, ActDiag, NwDiag), Ditaa, GraphViz, Mermaid, PlantUML, Shaape and WaveDrom syntax.
  
  Each extension runs the diagram processor to generate an SVG, PNG, or TXT file from the input text.
  The generated file is then inserted into your rendered document.
  
  Asciidoctor Diagram was inspired by the {uri-py-plantuml}[AsciiDoc PlantUML filter].
  
  ifndef::diagram_no_status[]
  == Status
  
  image:https://travis-ci.org/asciidoctor/asciidoctor-diagram.svg?branch=master["Linux Build Status", link="https://travis-ci.org/asciidoctor/asciidoctor-diagram"]
  
  image:https://ci.appveyor.com/api/projects/status/4r4gkk5gy3igs6nh/branch/master?svg=true["Windows Build Status", link="https://ci.appveyor.com/project/asciidoctor/asciidoctor-diagram"]
  endif::diagram_no_status[]
  
  == Installation
  
  Asciidoctor Diagram is a RubyGem.
  You can install it using the `gem` command or via Bundler by adding it to your application's Gemfile.
  
  You can install the Asciidoctor Diagram gem by typing `gem install` in the CLI.
  
   $ gem install asciidoctor-diagram
  
  Alternatively, you can install it using Bundler.
  
  .Gemfile
  [source,ruby]
  ----
  gem 'asciidoctor-diagram', '~> 1.4.0' // <1>
  ----
  <1> Add this line to your application's Gemfile and save the file.
  
  Then execute `bundle` in the CLI.
  
   $ bundle
  
  == Creating a Diagram
  
  A diagram is written inside a literal block, which can accept several attributes.
  
  .Anatomy of a diagram
  ----
  [block-name, generated-file-name, generated-file-extension] // <1> <2> <3>
  .... // <4>
  Diagram in appropriate syntax
  ....
  ----
  <1> The first position in the attribute list assigns the block's name.
  <2> The second, optional position assigns a file name (i.e. `target`) to the generated diagram. If a target is not specified an auto-generated name will be used.
  <3> The third, optional position assigns a file extension (i.e. `format`) to the generated diagram.
  <4> Place the attribute list directly on top of the delimited literal block (`....`). Diagram block names can also be assigned to open blocks (`--`).
  
  The following block names and output formats are available:
  
  
  [cols=">,4*^"]
  |===
  |Block                       |gif    |png    |svg    |txt
  |{uri-actdiag}[actdiag]      |       |{check}|{check}|
  |{uri-blockdiag}[blockdiag]  |       |{check}|{check}|
  |{uri-ditaa}[ditaa]          |       |{check}|       |
  |{uri-graphviz}[graphviz]    |       |{check}|{check}|
  |<<meme,meme>>               |{check}|{check}|       |
  |{uri-mermaid}[mermaid]      |       |{check}|{check}|
  |{uri-nwdiag}[nwdiag]        |       |{check}|{check}|
  |{uri-packetdiag}[packetdiag]|       |{check}|{check}|
  |{uri-plantuml}[plantuml]    |       |{check}|{check}|{check}
  |{uri-rackdiag}[rackdiag]    |       |{check}|{check}|
  |{uri-seqdiag}[seqdiag]      |       |{check}|{check}|
  |{uri-shaape}[shaape]        |       |{check}|{check}|
  |{uri-wavedrom}[wavedrom]    |       |{check}|{check}|
  |===
  
  The example below illustrates the structure of a basic ditaa block written directly in an AsciiDoc document.
  
  .Basic ditaa block
  [source]
  ----
  [ditaa]
  ....
                     +-------------+
                     | Asciidoctor |-------+
                     |   diagram   |       |
                     +-------------+       | PNG out
                         ^                 |
                         | ditaa in        |
                         |                 v
   +--------+   +--------+----+    /---------------\
   |        | --+ Asciidoctor +--> |               |
   |  Text  |   +-------------+    |   Beautiful   |
   |Document|   |   !magic!   |    |    Output     |
   |     {d}|   |             |    |               |
   +---+----+   +-------------+    \---------------/
       :                                   ^
       |          Lots of work             |
       +-----------------------------------+
  ....
  ----
  
  The ditaa block above results in the following generated diagram.
  
  .Rendered ditaa diagram
  image::asciidoctor-diagram-process.png[Asciidoctor Diagram process diagram,650,319]
  
  The rendered ditaa diagram above gets the file name `58372f7d2ceffae9e91fd0a7cbb080b6.png`.
  That long number is the checksum of the source code calculated by asciidoctor-diagram.
  If you want to give your generated files a more meaningful name, fill in the `target` attribute.
  
  This can be done by either specifying it as the second positional attribute or as a named attribute.
  Both examples below would result in a file called `ditaa-diagram.png`.
  
  ....
  [ditaa, "ditaa-diagram"]
  ----
  <snip>
  ----
  
  [ditaa, target="ditaa-diagram"]
  ----
  <snip>
  ----
  ....
  
  
  The example below illustrates the structure of a basic PlantUML block written directly in an AsciiDoc document.
  
  .PlantUML Diagram Syntax
  [source]
  ----
  [plantuml, diagram-classes, png] // <1> <2> <3>
  ....
  class BlockProcessor
  class DiagramBlock
  class DitaaBlock
  