Skip to content

Commit

Permalink
remove header ids from original tests
Browse files Browse the repository at this point in the history
  • Loading branch information
UziTech committed Mar 12, 2019
1 parent 775d08d commit df310a8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 24 deletions.
14 changes: 0 additions & 14 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(/&#39;/g, '\'')
.replace(/&quot;/g, '"')
.replace(/&gt;/g, '>')
.replace(/&lt;/g, '<')
.replace(/&amp;/g, '&');

id = id.toLowerCase().replace(/[^\w]+/g, '-');

return '<' + h + ' id="' + id + '">' + text + '</' + h + '>';
});

fs.writeFileSync(file, html);
});

Expand Down
20 changes: 10 additions & 10 deletions test/original/markdown_documentation_syntax.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
pedantic: true
headerIds: false
---

Markdown: Syntax
Expand Down Expand Up @@ -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.

Expand All @@ -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
Expand Down Expand Up @@ -535,7 +536,7 @@ following lines will produce a horizontal rule:
***

*****

- - -

---------------------------------------
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -889,4 +890,3 @@ Markdown provides backslash escapes for the following characters:
- minus sign (hyphen)
. dot
! exclamation mark

3 changes: 3 additions & 0 deletions test/original/ordered_and_unordered_lists.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
headerIds: false
---
## Unordered

Asterisks tight:
Expand Down

0 comments on commit df310a8

Please sign in to comment.