Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Markdown support (with bugfixes and specs). #90

Merged
merged 8 commits into from
Oct 18, 2012
Merged

Conversation

tobie
Copy link
Contributor

@tobie tobie commented Oct 18, 2012

Markdown support is optional. It is enabled by setting the format
property of the configuration object to "markdown."

ReSpec uses marked for parsing Markkdown.

Note that the content of SECTION elements, and P elements with a
class name of "note" or "issue" is also parsed.

The HTML created by the Markdown parser is turned into a nested
structure of SECTION elements, following the strucutre given by
the headings. For example, the following markup:

Title
-----

### Subtitle ###

Here's some text.

### Another subtitle ###

More text.

will be transformed into:

<section>
  <h2>Title</h2>
  <section>
    <h3>Subtitle</h3>
    <p>Here's some text.</p>
  </section>
  <section>
    <h3>Another subtitle</h3>
    <p>More text.</p>
  </section>
</section>

tobie added 8 commits October 17, 2012 11:54
Markdown support is optional. It is enabled by setting the `format`
property of the configuration object to "markdown."

ReSpec uses marked for parsing Markkdown.

Note that the content of SECTION elements, and P elements with a
class name of "note" or "issue" is also parsed.

The HTML created by the Markdown parser is turned into a nested
structure of SECTION elements, following the strucutre given by
the headings. For example, the following markup:

    Title
    -----

    ### Subtitle ###

    Here's some text.

    ### Another subtitle ###

    More text.

will be transformed into:

    <section>
      <h2>Title</h2>
      <section>
        <h3>Subtitle</h3>
        <p>Here's some text.</p>
      </section>
      <section>
        <h3>Another subtitle</h3>
        <p>More text.</p>
      </section>
    </section>
E.g.:

'''
<div>
    This is a title
    ---------------
    
    And this more text.
</div
'''

Gets turned into:

'''
<div>
    <h2>This is a title</h2>
    <p>And this more text.</p>
</div
'''

Rather than:

'''
<div>
    <pre><code>This is a title
---------------

And this more text.</code></pre>
</div
'''
@tobie tobie mentioned this pull request Oct 18, 2012
darobin added a commit that referenced this pull request Oct 18, 2012
Add Markdown support (with bugfixes and specs).
@darobin darobin merged commit c4cd575 into speced:develop Oct 18, 2012
@tobie tobie deleted the md branch August 7, 2014 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants