remove header ids from original tests
This commit is contained in:
parent
775d08db5a
commit
df310a8cb3
14
test/index.js
vendored
14
test/index.js
vendored
@ -404,20 +404,6 @@ function fix() {
|
||||
.replace(/&__QUOT__;/g, '"')
|
||||
.replace(/&__APOS__;/g, '\'');
|
||||
|
||||
// add heading id's
|
||||
html = html.replace(/<(h[1-6])>([^<]+)<\/\1>/g, function(s, h, text) {
|
||||
var id = text
|
||||
.replace(/'/g, '\'')
|
||||
.replace(/"/g, '"')
|
||||
.replace(/>/g, '>')
|
||||
.replace(/</g, '<')
|
||||
.replace(/&/g, '&');
|
||||
|
||||
id = id.toLowerCase().replace(/[^\w]+/g, '-');
|
||||
|
||||
return '<' + h + ' id="' + id + '">' + text + '</' + h + '>';
|
||||
});
|
||||
|
||||
fs.writeFileSync(file, html);
|
||||
});
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
---
|
||||
pedantic: true
|
||||
headerIds: false
|
||||
---
|
||||
|
||||
Markdown: Syntax
|
||||
@ -258,7 +259,7 @@ wrap the text and put a `>` before every line:
|
||||
> This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,
|
||||
> consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
|
||||
> Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.
|
||||
>
|
||||
>
|
||||
> Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse
|
||||
> id sem consectetuer libero luctus adipiscing.
|
||||
|
||||
@ -285,12 +286,12 @@ Blockquotes can contain other Markdown elements, including headers, lists,
|
||||
and code blocks:
|
||||
|
||||
> ## This is a header.
|
||||
>
|
||||
>
|
||||
> 1. This is the first list item.
|
||||
> 2. This is the second list item.
|
||||
>
|
||||
>
|
||||
> Here's some example code:
|
||||
>
|
||||
>
|
||||
> return shell_exec("echo $input | $markdown_script");
|
||||
|
||||
Any decent text editor should make email-style quoting easy. For
|
||||
@ -535,7 +536,7 @@ following lines will produce a horizontal rule:
|
||||
***
|
||||
|
||||
*****
|
||||
|
||||
|
||||
- - -
|
||||
|
||||
---------------------------------------
|
||||
@ -636,7 +637,7 @@ multiple words in the link text:
|
||||
Visit [Daring Fireball][] for more information.
|
||||
|
||||
And then define the link:
|
||||
|
||||
|
||||
[Daring Fireball]: http://daringfireball.net/
|
||||
|
||||
Link definitions can be placed anywhere in your Markdown document. I
|
||||
@ -760,13 +761,13 @@ one after the opening, one before the closing. This allows you to place
|
||||
literal backtick characters at the beginning or end of a code span:
|
||||
|
||||
A single backtick in a code span: `` ` ``
|
||||
|
||||
|
||||
A backtick-delimited string in a code span: `` `foo` ``
|
||||
|
||||
will produce:
|
||||
|
||||
<p>A single backtick in a code span: <code>`</code></p>
|
||||
|
||||
|
||||
<p>A backtick-delimited string in a code span: <code>`foo`</code></p>
|
||||
|
||||
With a code span, ampersands and angle brackets are encoded as HTML
|
||||
@ -837,7 +838,7 @@ use regular HTML `<img>` tags.
|
||||
Markdown supports a shortcut style for creating "automatic" links for URLs and email addresses: simply surround the URL or email address with angle brackets. What this means is that if you want to show the actual text of a URL or email address, and also have it be a clickable link, you can do this:
|
||||
|
||||
<http://example.com/>
|
||||
|
||||
|
||||
Markdown will turn this into:
|
||||
|
||||
<a href="http://example.com/">http://example.com/</a>
|
||||
@ -889,4 +890,3 @@ Markdown provides backslash escapes for the following characters:
|
||||
- minus sign (hyphen)
|
||||
. dot
|
||||
! exclamation mark
|
||||
|
||||
|
@ -1,3 +1,6 @@
|
||||
---
|
||||
headerIds: false
|
||||
---
|
||||
## Unordered
|
||||
|
||||
Asterisks tight:
|
||||
|
Loading…
x
Reference in New Issue
Block a user