Skip to content
Marcos Cáceres edited this page Feb 8, 2018 · 15 revisions

Tells ReSpec to treat the document as being in a format other than HTML. Supported formats:

"markdown"
Interpreted as GitHub flavored markdown

Example

var respecConfig = {
  format: "markdown",
}

Markdown

When format is set to "markdown", you can use a mix of HTML and markdown:

## Using markdown
This will be a paragraph. 

<pre class="example" title="A markdown example">
function thisIsNice(){
  becauseWeCanUseMarkdown();
}

// And using markdown is pretty sweet!
const foo = "FOO";
while(foo){
  Promise.all([...lotsOfPromises])
}
</pre>

ReSpec will do its best to correctly format the markdown. Please remember that markdown is supposed to be placed flush against the left margin - but we do support padded sections.

<section>
  ## This is heading
  This is a paragraph, though it is not flush to the left margin.

    * this will be a list item. 
    * so will this.
</section> 

See also: nolink class to disable automatic linking in code blocks, if needed.

Known issues

In some cases, the markdown processor gets confused. For example, given:

<pre class="example">
1 * 2 * 3;
</pre>

The ""s get converted to an <em>. Obviously, that's not great. A workaround is to wrap the "" in back-ticks, like this:

<pre class="example">
1 `*` 2 `*` 3;
</pre>

Guides

Configuration options

W3C Configuration options

Linter rules

Internal properties

Handled by ReSpec for you.

Special <section> IDs

HTML elements

Custom Elements

WebIDL

HTML attributes

CSS Classes

Special properties

Clone this wiki locally