protocol
The protocol plugin will check if a code block has a protocol language tag. If found the the
following steps will be performed:
-
protocolwill be executed with the contents of the code block given to it on the command line. -
The code block's contents will then be deleted and replaced with the output from
protocol.
Error handling
In case of an error, the code block is left as-is.
Example
This markdown file:
We describe the following protocol:
``` protocol
Source:16,TTL:8,Reserved:40
```
Figure: This is a protocol.
Will be transformed with filter -p protocol < protocol.md | mmark -markdown, to:
We describe the following protocol:
```
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Source | TTL | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +
| Reserved |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
```
Figure: This is a protocol.
See Also
http://www.luismg.com/protocol/ and the exec plugin.