diff --git a/src/defaults.ts b/src/defaults.ts index a66a7551d7..83679a5827 100644 --- a/src/defaults.ts +++ b/src/defaults.ts @@ -10,12 +10,12 @@ export function _getDefaults(): MarkedOptions { breaks: false, extensions: null, gfm: true, - headerIds: true, + headerIds: false, headerPrefix: '', highlight: null, hooks: null, langPrefix: 'language-', - mangle: true, + mangle: false, pedantic: false, renderer: null, sanitize: false, diff --git a/test/specs/new/heading_following_list.html b/test/specs/new/heading_following_list.html index b022d175ea..13a97ef0b0 100644 --- a/test/specs/new/heading_following_list.html +++ b/test/specs/new/heading_following_list.html @@ -1,8 +1,8 @@ -
<!-- too much indentation -->
-<!--> not a comment -->
@@ -56,7 +56,7 @@## Heading
diff --git a/test/specs/new/list_code_header.html b/test/specs/new/list_code_header.html
index 7fab582d37..af101cd761 100644
--- a/test/specs/new/list_code_header.html
+++ b/test/specs/new/list_code_header.html
@@ -1,3 +1,3 @@
paragraph
paragraph
diff --git a/test/specs/new/pedantic_heading.html b/test/specs/new/pedantic_heading.html index 7795a3bccc..9efe5516c0 100644 --- a/test/specs/new/pedantic_heading.html +++ b/test/specs/new/pedantic_heading.html @@ -1,9 +1,9 @@ -# h1
diff --git a/test/specs/new/pedantic_heading_interrupts_paragraph.html b/test/specs/new/pedantic_heading_interrupts_paragraph.html index 9e232fd65d..a9ab3352c8 100644 --- a/test/specs/new/pedantic_heading_interrupts_paragraph.html +++ b/test/specs/new/pedantic_heading_interrupts_paragraph.html @@ -1,5 +1,5 @@paragraph before head with hash
-paragraph before head with equals
-Now is the time for all good men to come to the aid of their country. This is just a regular paragraph.
- +The quick brown fox jumped over the lazy dog's back.
- +@@ -109,7 +110,7 @@ Markdown: Some of these words *are emphasized*. Some of these words _are emphasized also_. - + Use two asterisks for **strong emphasis**. Or, if you prefer, __use two underscores instead__. @@ -117,10 +118,10 @@ Output:This is a blockquote.
- +This is the second paragraph in the blockquote.
- +This is an H2 in a blockquote
Some of these words are emphasized. Some of these words are emphasized also.
- +Use two asterisks for strong emphasis. Or, if you prefer, use two underscores instead.
- + ## Lists ## @@ -173,7 +174,7 @@ list item text. You can create multi-paragraph list items by indenting the paragraphs by 4 spaces or 1 tab: * A list item. - + With multiple paragraphs. * Another item in the list. @@ -185,7 +186,7 @@ Output:With multiple paragraphs.
Another item in the list.
I strongly recommend against using any
<blink>
tags.
I wish SmartyPants used named entities like
—
instead of decimal-encoded
entites like —
.
If you want your page to validate under XHTML 1.0 Strict, you've got to put paragraph tags in your blockquotes:
- +<blockquote>
<p>For example.</p>
</blockquote>
diff --git a/test/specs/security/sanitizer_bypass.html b/test/specs/security/sanitizer_bypass.html
index fb35223cf0..93ea90add8 100644
--- a/test/specs/security/sanitizer_bypass.html
+++ b/test/specs/security/sanitizer_bypass.html
@@ -3,4 +3,4 @@
AAA<sometag> <img <sometag> src=x onerror=alert(1)BBB
<a>a2<a2t>a2</a> b <c>c</c> d
-
+
diff --git a/test/specs/security/sanitizer_bypass_remove_generic.html b/test/specs/security/sanitizer_bypass_remove_generic.html
index 272825867d..90049f4652 100644
--- a/test/specs/security/sanitizer_bypass_remove_generic.html
+++ b/test/specs/security/sanitizer_bypass_remove_generic.html
@@ -1,2 +1,2 @@
a2a2 b c d
-
+
diff --git a/test/unit/Hooks-spec.js b/test/unit/Hooks-spec.js
index 0fee5861c3..dc904eb26a 100644
--- a/test/unit/Hooks-spec.js
+++ b/test/unit/Hooks-spec.js
@@ -11,7 +11,7 @@ describe('Hooks', () => {
}
});
const html = marked('*text*');
- expect(html.trim()).toBe('preprocess
\ntext
');
+ expect(html.trim()).toBe('preprocess
\ntext
');
});
it('should preprocess async', async() => {
@@ -27,7 +27,7 @@ describe('Hooks', () => {
const promise = marked('*text*');
expect(promise).toBeInstanceOf(Promise);
const html = await promise;
- expect(html.trim()).toBe('preprocess async
\ntext
');
+ expect(html.trim()).toBe('preprocess async
\ntext
');
});
it('should preprocess options', () => {
@@ -112,6 +112,6 @@ describe('Hooks', () => {
const promise = marked('*text*');
expect(promise).toBeInstanceOf(Promise);
const html = await promise;
- expect(html.trim()).toBe('preprocess1
\npreprocess2
\ntext
\npostprocess2 async
\npostprocess1
');
+ expect(html.trim()).toBe('preprocess1
\npreprocess2
\ntext
\npostprocess2 async
\npostprocess1
');
});
});
diff --git a/test/unit/Parser-spec.js b/test/unit/Parser-spec.js
index adf5c27c10..487641adf9 100644
--- a/test/unit/Parser-spec.js
+++ b/test/unit/Parser-spec.js
@@ -50,7 +50,7 @@ describe('Parser', () => {
{ type: 'text', text: 'heading' }
]
}],
- html: 'heading
'
+ html: 'heading
'
});
});
diff --git a/test/unit/instance-spec.js b/test/unit/instance-spec.js
index 4aab129d49..bfcbd00ee9 100644
--- a/test/unit/instance-spec.js
+++ b/test/unit/instance-spec.js
@@ -22,7 +22,7 @@ describe('Marked', () => {
expect(marked1.parse('# header')).toBe('im marked1');
expect(marked2.parse('# header')).toBe('im marked2');
- expect(marked.parse('# header')).toBe('header
\n');
+ expect(marked.parse('# header')).toBe('header
\n');
});
it('should work with use', () => {
@@ -48,7 +48,7 @@ describe('Marked', () => {
expect(marked1.parse('# header')).toBe('im marked1');
expect(marked2.parse('# header')).toBe('im marked2');
- expect(marked.parse('# header')).toBe('header
\n');
+ expect(marked.parse('# header')).toBe('header
\n');
});
it('should work with setOptions', () => {
@@ -70,6 +70,6 @@ describe('Marked', () => {
expect(marked1.parse('# header')).toBe('im marked1');
expect(marked2.parse('# header')).toBe('im marked2');
- expect(marked.parse('# header')).toBe('header
\n');
+ expect(marked.parse('# header')).toBe('header
\n');
});
});
diff --git a/test/unit/marked-spec.js b/test/unit/marked-spec.js
index 7533cea954..6f55d4a6a4 100644
--- a/test/unit/marked-spec.js
+++ b/test/unit/marked-spec.js
@@ -755,7 +755,7 @@ paragraph
# heading
`);
- expect(html).toBe('extension2 paragraph\nextension1 html\nheading
\n');
+ expect(html).toBe('extension2 paragraph\nextension1 html\nheading
\n');
});
it('should use previous extension when returning false', () => {