simple_markdown_extension_blueprint v0.2.0 SimpleMarkdownExtensionBlueprint

Adds syntax for issuing a blueprint command and embedding the resulting SVG.

The command takes the form of @blueprint[] or @blueprint(). Where inside the brackets are the arguments that can be passed to a blueprint escript. The @blueprint prefix may optionally be followed by options separated by a - to customize how it should be added to the page.

These options are:

  • Overriding the width of the element that comes after it, by providing a w before the literal to be used for the width (where no literal means it will use the default pixel width). e.g. If it comes before the [] it will affect the width of the SVG element, whereas if it comes before an embed option it will affect the width of the container.
  • Overriding the height of the element that comes after it, by providing a h before the literal to be used for the height (where no literal means it will use the default pixel height). e.g. If it comes before the [] it will affect the height of the SVG element, whereas if it comes before an embed option it will affect the height of the container.
  • Place the SVG in a scrollable container, by providing the embed option.

Example

@blueprint[plot app --messages --colour]

Which produces:

G node_1 graphvix node_1->node_1 node_1->node_1 node_3 blueprint node_3->node_1 node_3->node_3 node_6 simple_markdown node_3->node_6 node_8 simple_markdown_extension_cli node_3->node_8 node_6->node_6 node_19 html_entities node_6->node_19 node_21 parsey node_6->node_21 node_8->node_8 node_10 earmark node_10->node_10 node_12 ex_doc node_12->node_10 node_12->node_12 node_15 ex_doc_simple_markdown node_15->node_6 node_15->node_12 node_19->node_19 node_21->node_21 node_26 simple_markdown_extension_blueprint node_26->node_26

Fixed size example

@blueprint-w300px-h50px[plot app --messages --colour]

Which produces:

G node_29 graphvix node_29->node_29 node_29->node_29 node_31 blueprint node_31->node_29 node_31->node_31 node_34 simple_markdown node_31->node_34 node_36 simple_markdown_extension_cli node_31->node_36 node_34->node_34 node_47 html_entities node_34->node_47 node_49 parsey node_34->node_49 node_36->node_36 node_38 earmark node_38->node_38 node_40 ex_doc node_40->node_38 node_40->node_40 node_43 ex_doc_simple_markdown node_43->node_34 node_43->node_40 node_47->node_47 node_49->node_49 node_54 simple_markdown_extension_blueprint node_54->node_54

Relative size example

@blueprint-w50%-h50%[plot app --messages --colour]

Which produces:

G node_57 graphvix node_57->node_57 node_57->node_57 node_59 blueprint node_59->node_57 node_59->node_59 node_62 simple_markdown node_59->node_62 node_64 simple_markdown_extension_cli node_59->node_64 node_62->node_62 node_75 html_entities node_62->node_75 node_77 parsey node_62->node_77 node_64->node_64 node_66 earmark node_66->node_66 node_68 ex_doc node_68->node_66 node_68->node_68 node_71 ex_doc_simple_markdown node_71->node_62 node_71->node_68 node_75->node_75 node_77->node_77 node_82 simple_markdown_extension_blueprint node_82->node_82

Embed example

@blueprint-embed[plot app --messages --colour]

Which produces:

Fixed size embed with relative size example

@blueprint-w100px-h50px-embed-w500%-h500%[plot app --messages --colour]

Which produces:

Link to this section Summary

Functions

Insert the blueprint command rule in a appropriate place in the rule parser

The rule for matching blueprint commands

Link to this section Functions

Link to this function add_rule(rules)
add_rule([Parsey.rule()]) :: [Parsey.rule()]

Insert the blueprint command rule in a appropriate place in the rule parser.

The rule for matching blueprint commands.