`$ 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*'

I am markdown

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

I am *markdown*

Hi, I am markdown

Executing command in code blocks and producing raw markdown

echo 'I am *markdown*'

I am markdown

Executing command in one-line comments and producing raw markdown

I am markdown

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

Hi, I am markdown

Executing command in multiline comments and producing raw markdown

I am markdown

> $ description

I’m gen-md.sh

Reading files contents

Reading file in inline code and producing raw markdown

> < ./samples/example.md

this is part of the example.md file

Reading file in code blocks and producing raw markdown

./samples/example.md

this is part of the example.md file

Reading file in one-line comments and producing raw markdown

this is part of the example.md file

Reading file in multiline comments and producing raw markdown

this is part of the example.md file

> < description

this is part of the example.md file

Using inlined values

Producing code blocks

Executing shell commands

Executing command in inline code and producing code block

> yaml $ echo 'foo: true'

foo: true

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

foo: true
foo: true # hmm

Executing command in code blocks and producing code block

echo 'foo: true'
foo: true

Executing command in one-line comments and producing code block

foo: true

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

foo: true # hmm

Executing command in multiline comments and producing code block

foo: true

> yaml $ description

foo: bar

Reading files contents

Reading file in inline code and producing code block

> yaml < ./samples/example.yml

foo: bar

Reading file in code blocks and producing code block

./samples/example.yml
foo: bar

Reading file in one-line comments and producing code block

foo: bar

Reading file in multiline comments and producing code block

foo: bar

> yaml < description

foo: bar

Using inlined values

Using inlined data in inline code and producing code block

> yaml foo: true

foo: true

Using inlined data in code blocks and producing code block

foo: true
foo: true

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

foo: true

Using inlined data in multiline comments and producing code block

foo: true

> yaml description

./samples/example.yml

Sourcing environment variables

Executing shell commands

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

! $ echo 'foo=bar'

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

$foo is bar

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

foo=bar

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

$foo is bar

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

echo 'foo=bar'

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

$foo is bar

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

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

$foo is bar

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

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

$foo is bar

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

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

$foo is bar

! $ description

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

$foo is bar

Reading files contents

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

! < ./samples/example.env

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

$foo is bar

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

./samples/example.env

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

$foo is bar

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

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

$foo is bar

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

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

$foo is bar

! < description

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

$foo is bar

Using inlined values

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

! foo=bar

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

$foo is bar

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

foo=bar

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

$foo is bar

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

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

$foo is bar

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

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

$foo is bar

The end!