`$ mdsh`

mdsh spec.

Each H4 section is converted into a test case by build.rs script. Each section in spec.clear.md must correspond to the same section in spec.processed.md. spec.processed.md is a version of this file after one mdsh pass. spec.processed.md must be idempotent, i.e. any next passes result in the same content. mdsh --clean pass on spec.processed.md must result in spec.clear.md.

Producing raw markdown

Executing shell commands

Executing command in inline code and producing raw markdown

> $ echo 'I am *markdown*'

Executing command in code blocks with data line and producing raw markdown

I am *markdown*

Executing command in code blocks and producing raw markdown

echo 'I am *markdown*'

Executing command in one-line comments and producing raw markdown

Executing command in multiline comments with data line and producing raw markdown

Executing command in multiline comments and producing raw markdown

> $ description

Reading files contents

Reading file in inline code and producing raw markdown

> < ./samples/example.md

Reading file in code blocks and producing raw markdown

./samples/example.md

Reading file in one-line comments and producing raw markdown

Reading file in multiline comments and producing raw markdown

> < description

Using inlined values

Producing code blocks

Executing shell commands

Executing command in inline code and producing code block

> yaml $ echo 'foo: true'

Executing command in code blocks with data line and producing code block

foo: true

Executing command in code blocks and producing code block

echo 'foo: true'

Executing command in one-line comments and producing code block

Executing command in multiline comments with data line and producing code block

Executing command in multiline comments and producing code block

> yaml $ description

Reading files contents

Reading file in inline code and producing code block

> yaml < ./samples/example.yml

Reading file in code blocks and producing code block

./samples/example.yml

Reading file in one-line comments and producing code block

Reading file in multiline comments and producing code block

> yaml < description

Using inlined values

Using inlined data in inline code and producing code block

> yaml foo: true

Using inlined data in code blocks and producing code block

foo: true

Using inlined data in one-line comments and producing code block

Using inlined data in multiline comments and producing code block

> yaml description

Sourcing environment variables

Executing shell commands

Executing command in inline code and sourcing env variable(s)

! $ echo 'foo=bar'

> $ echo "\`\$foo\` is $foo"

Executing command in code blocks with data line and sourcing env variable(s)

foo=bar

> $ echo "\`\$foo\` is $foo"

Executing command in code blocks and sourcing env variable(s)

echo 'foo=bar'

> $ echo "\`\$foo\` is $foo"

Executing command in one-line comments and sourcing env variable(s)

> $ echo "\`\$foo\` is $foo"

Executing command in multiline comments with data line and sourcing env variable(s)

> $ echo "\`\$foo\` is $foo"

Executing command in multiline comments and sourcing env variable(s)

> $ echo "\`\$foo\` is $foo"

! $ description

> $ echo "\`\$foo\` is $foo"

Reading files contents

Reading file in inline code and sourcing env variable(s)

! < ./samples/example.env

> $ echo "\`\$foo\` is $foo"

Reading file in code blocks and sourcing env variable(s)

./samples/example.env

> $ echo "\`\$foo\` is $foo"

Reading file in one-line comments and sourcing env variable(s)

> $ echo "\`\$foo\` is $foo"

Reading file in multiline comments and sourcing env variable(s)

> $ echo "\`\$foo\` is $foo"

! < description

> $ echo "\`\$foo\` is $foo"

Using inlined values

Using inlined data in inline code and sourcing env variable(s)

! foo=bar

> $ echo "\`\$foo\` is $foo"

Using inlined data in code blocks and sourcing env variable(s)

foo=bar

> $ echo "\`\$foo\` is $foo"

Using inlined data in one-line comments and sourcing env variable(s)

> $ echo "\`\$foo\` is $foo"

Using inlined data in multiline comments and sourcing env variable(s)

> $ echo "\`\$foo\` is $foo"

The end!