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. #78

Closed
wants to merge 4 commits into from
Closed

Add Markdown support. #78

wants to merge 4 commits into from

Conversation

tobie
Copy link
Contributor

@tobie tobie commented Sep 22, 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>

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
Copy link
Contributor Author

tobie commented Oct 18, 2012

Abandoned in favor of https://github.com/darobin/respec/pull/90.

@tobie tobie closed this Oct 18, 2012
shikhar-scs pushed a commit to shikhar-scs/respec that referenced this pull request Feb 19, 2018
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.

1 participant