The chamber was lit by a wide shaft high in the further eastern wall; it slanted upwards and, far above, a small square patch of blue sky could be seen. The light of the shaft fell directly on a table in the middle of the room: a single oblong block, about two feet high, upon which was laid a great slab of white stone.

J.R.R. Tolkien, The Lord of the Rings - The Fellowship of the Ring (1954)

Mau has the concept of blocks, which are parts of the text delimited by fences

Mau source
----
This is a block
----
HTML output
<div>
  <div class="content">
    <p>This is a block</p>
  </div>
</div>

This is a block


You can use any sequence of 4 identical characters to delimit a block, provided this doesn't clash with other syntax like the one used for headers or for comments

Mau source
++++
This is a block
++++

%%%%
This is another block
%%%%

This is a block

This is another block


If you need to insert 4 identical characters on a line for some reasons, you have to escape the first of them

Mau source
\++++

++++

Secondary content

Blocks have the concept of secondary content, which is any paragraph that is adjacent to the closing fence. This paragraph is included in the block metadata and used according to the type of block (see the chapter about highlighting code, for example). The default block simply discards that content

Mau source
----
Content of the block
----
Secondary content that won't be in the output

This is not part of the block

Content of the block

This is not part of the block

Block titles

Blocks can have titles, created by a paragraph starting with a dot

Mau source
. The title
----
This is a block
----
HTML output
<div>
  <div class="title">The title</div>
  <div class="content">
    <p>This is a block</p>
  </div>
</div>
The title

This is a block


The space between the dot and the title is optional

Mau source
.The title
----
This is a block
----
The title

This is a block

Block attributes

Blocks can have attributes, specified between square brackets before the opening fence, and the first attribute is the type of the block.

Mau source
[aside]
----
This is a block of type `aside`
----
HTML output
<div class="aside">
  <div class="content">
    <p>This is a block of type <code>aside</code></p>
  </div>
</div>

This is a block of type aside


You can combine title and attributes in any order.

Mau source
. Title of the block
[aside]
----
This is a block of type `aside` and a title
----

[aside]
. Title of the block
----
This is a block of type `aside` and a title
----
Title of the block

This is a block of type aside and a title

Title of the block

This is a block of type aside and a title


Title and attributes are consumed by the next block, so they don't need to be adjacent to it.

Mau source
[aside]

----
This is a block of type `aside`
----

This is a block of type aside