mirror of
https://github.com/showdownjs/showdown.git
synced 2024-03-22 13:30:55 +08:00
63d949f731
A simple metadata parser can be useful in markdown documents. This commit introduces the feature, with the following syntax: --- or ««« at tstart of the document, (optionally) followed by a alphanumeric format identifier followed by key value pairs separated by a colon and a space followed by --- or  Also, adds methods for retrieving the parsed metadata, namely: getMetadata() and getMetadataFormat Closes #260
16 lines
415 B
HTML
16 lines
415 B
HTML
<hr />
|
|
<p>title: This is the document title
|
|
language: en
|
|
author: Tivie
|
|
contributors: John, Mary, Steve
|
|
description: This is a long text and so it
|
|
spans on multiple lines.
|
|
It must be indented,
|
|
for showdown to parse it correctly.
|
|
Markdown <strong>such as bold</strong> is not parsed
|
|
and it will be rendered as plain text.
|
|
date: 01-01-2010
|
|
keywords: foo, bar, baz</p>
|
|
<hr />
|
|
<p><strong>some</strong> markdown text</p>
|