Skip to content

Commit df310a8

Browse files
committed
remove header ids from original tests
1 parent 775d08d commit df310a8

File tree

3 files changed

+13
-24
lines changed

3 files changed

+13
-24
lines changed

test/index.js

-14
Original file line numberDiff line numberDiff line change
@@ -404,20 +404,6 @@ function fix() {
404404
.replace(/&__QUOT__;/g, '"')
405405
.replace(/&__APOS__;/g, '\'');
406406

407-
// add heading id's
408-
html = html.replace(/<(h[1-6])>([^<]+)<\/\1>/g, function(s, h, text) {
409-
var id = text
410-
.replace(/&#39;/g, '\'')
411-
.replace(/&quot;/g, '"')
412-
.replace(/&gt;/g, '>')
413-
.replace(/&lt;/g, '<')
414-
.replace(/&amp;/g, '&');
415-
416-
id = id.toLowerCase().replace(/[^\w]+/g, '-');
417-
418-
return '<' + h + ' id="' + id + '">' + text + '</' + h + '>';
419-
});
420-
421407
fs.writeFileSync(file, html);
422408
});
423409

test/original/markdown_documentation_syntax.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
pedantic: true
3+
headerIds: false
34
---
45

56
Markdown: Syntax
@@ -258,7 +259,7 @@ wrap the text and put a `>` before every line:
258259
> This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,
259260
> consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
260261
> Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.
261-
>
262+
>
262263
> Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse
263264
> id sem consectetuer libero luctus adipiscing.
264265

@@ -285,12 +286,12 @@ Blockquotes can contain other Markdown elements, including headers, lists,
285286
and code blocks:
286287

287288
> ## This is a header.
288-
>
289+
>
289290
> 1. This is the first list item.
290291
> 2. This is the second list item.
291-
>
292+
>
292293
> Here's some example code:
293-
>
294+
>
294295
> return shell_exec("echo $input | $markdown_script");
295296

296297
Any decent text editor should make email-style quoting easy. For
@@ -535,7 +536,7 @@ following lines will produce a horizontal rule:
535536
***
536537

537538
*****
538-
539+
539540
- - -
540541

541542
---------------------------------------
@@ -636,7 +637,7 @@ multiple words in the link text:
636637
Visit [Daring Fireball][] for more information.
637638

638639
And then define the link:
639-
640+
640641
[Daring Fireball]: http://daringfireball.net/
641642

642643
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
760761
literal backtick characters at the beginning or end of a code span:
761762

762763
A single backtick in a code span: `` ` ``
763-
764+
764765
A backtick-delimited string in a code span: `` `foo` ``
765766

766767
will produce:
767768

768769
<p>A single backtick in a code span: <code>`</code></p>
769-
770+
770771
<p>A backtick-delimited string in a code span: <code>`foo`</code></p>
771772

772773
With a code span, ampersands and angle brackets are encoded as HTML
@@ -837,7 +838,7 @@ use regular HTML `<img>` tags.
837838
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:
838839

839840
<http://example.com/>
840-
841+
841842
Markdown will turn this into:
842843

843844
<a href="http://example.com/">http://example.com/</a>
@@ -889,4 +890,3 @@ Markdown provides backslash escapes for the following characters:
889890
- minus sign (hyphen)
890891
. dot
891892
! exclamation mark
892-

test/original/ordered_and_unordered_lists.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
---
2+
headerIds: false
3+
---
14
## Unordered
25

36
Asterisks tight:

0 commit comments

Comments
 (0)