mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-10-13 08:32:54 +08:00
fix(curriculum): update ambiguos requirement md to html (#59050)
This commit is contained in:
+10
-10
@@ -134,7 +134,7 @@ const testH1 = testDiv.querySelector("h1")
|
||||
assert.notExists(testH1);
|
||||
```
|
||||
|
||||
When the value of `#markdown-input` is `# title 1\n# alternate title`, `convertMarkdown()` should return `<h1>title 1</h1><h1>alternate title</h1>`.
|
||||
When the value of `#markdown-input` is `# title 1` followed by `# alternate title` on a new line, `convertMarkdown()` should return `<h1>title 1</h1><h1>alternate title</h1>`.
|
||||
|
||||
```js
|
||||
const input = document.querySelector("#markdown-input");
|
||||
@@ -200,7 +200,7 @@ const testH2 = testDiv.querySelector("h2")
|
||||
assert.notExists(testH2);
|
||||
```
|
||||
|
||||
When the value of `#markdown-input` is `## title 2\n## title 2 alt`, `convertMarkdown()` should return `<h2>title 2</h2><h2>title 2 alt</h2>`.
|
||||
When the value of `#markdown-input` is `## title 2` followed by `## title 2 alt` on a new line, `convertMarkdown()` should return `<h2>title 2</h2><h2>title 2 alt</h2>`.
|
||||
|
||||
```js
|
||||
const input = document.querySelector("#markdown-input");
|
||||
@@ -266,7 +266,7 @@ const testH3 = testDiv.querySelector("h3")
|
||||
assert.notExists(testH3);
|
||||
```
|
||||
|
||||
When the value of `#markdown-input` is `### title 3\n### third title`, `convertMarkdown()` should return `<h3>title 3</h3><h3>third title</h3>`.
|
||||
When the value of `#markdown-input` is `### title 3` followed by `### third title` on a new line, `convertMarkdown()` should return `<h3>title 3</h3><h3>third title</h3>`.
|
||||
|
||||
```js
|
||||
const input = document.querySelector("#markdown-input");
|
||||
@@ -321,7 +321,7 @@ assert.lengthOf(preview.children, 1)
|
||||
assert.equal(strongs[0].innerText, "this is bold");
|
||||
```
|
||||
|
||||
When the value of `#markdown-input` is `**this is bold**\n**this is also bold**`, `convertMarkdown()` should return `<strong>this is bold</strong><strong>this is also bold</strong>`.
|
||||
When the value of `#markdown-input` is `**this is bold**` followed by `**this is also bold**` on a new line, `convertMarkdown()` should return `<strong>this is bold</strong><strong>this is also bold</strong>`.
|
||||
|
||||
```js
|
||||
const input = document.querySelector("#markdown-input");
|
||||
@@ -363,7 +363,7 @@ assert.lengthOf(preview.children, 1)
|
||||
assert.equal(strongs[0].innerText, "this is bold");
|
||||
```
|
||||
|
||||
When the value of `#markdown-input` is `__this is bold__\n__this is also bold__`, `convertMarkdown()` should return `<strong>this is bold</strong><strong>this is also bold</strong>`.
|
||||
When the value of `#markdown-input` is `__this is bold__` followed by `__this is also bold__` on a new line, `convertMarkdown()` should return `<strong>this is bold</strong><strong>this is also bold</strong>`.
|
||||
|
||||
```js
|
||||
const input = document.querySelector("#markdown-input");
|
||||
@@ -418,7 +418,7 @@ assert.lengthOf(preview.children, 1);
|
||||
assert.equal(italics[0].innerText, "this is italic");
|
||||
```
|
||||
|
||||
When the value of `#markdown-input` is `*this is italic*\n*this is also italic*`, `convertMarkdown()` should return `<em>this is italic</em><em>this is also italic</em>`.
|
||||
When the value of `#markdown-input` is `*this is italic*` followed by `*this is also italic*` on a new line, `convertMarkdown()` should return `<em>this is italic</em><em>this is also italic</em>`.
|
||||
|
||||
```js
|
||||
const input = document.querySelector("#markdown-input");
|
||||
@@ -473,7 +473,7 @@ assert.lengthOf(preview.children, 1);
|
||||
assert.equal(italics[0].innerText, "this is italic");
|
||||
```
|
||||
|
||||
When the value of `#markdown-input` is `_this is italic_\n_this is also italic_`, `convertMarkdown()` should return `<em>this is italic</em><em>this is also italic</em>`.
|
||||
When the value of `#markdown-input` is `_this is italic_` followed by `_this is also italic_` on a new line, `convertMarkdown()` should return `<em>this is italic</em><em>this is also italic</em>`.
|
||||
|
||||
```js
|
||||
const input = document.querySelector("#markdown-input");
|
||||
@@ -614,7 +614,7 @@ assert.equal(imgs[0].alt, "alt-text");
|
||||
assert.isTrue(imgs[0].src.endsWith("image-source"));
|
||||
```
|
||||
|
||||
When the value of `#markdown-input` is `\n`, `convertMarkdown()` should return `<img alt="alt-text" src="image-source"><img alt="alt-text-2" src="image-source-2">`.
|
||||
When the value of `#markdown-input` is `` followed by `` on a new line, `convertMarkdown()` should return `<img alt="alt-text" src="image-source"><img alt="alt-text-2" src="image-source-2">`.
|
||||
|
||||
```js
|
||||
const input = document.querySelector("#markdown-input");
|
||||
@@ -674,7 +674,7 @@ assert.isTrue(anchors[0].href.endsWith("URL"));
|
||||
assert.equal(anchors[0].innerText, "link text");
|
||||
```
|
||||
|
||||
When the value of `#markdown-input` is `[link text](URL)\n[link text 2](URL2)`, `convertMarkdown()` should return `<a href="URL">link text</a><a href="URL2">link text 2</a>`.
|
||||
When the value of `#markdown-input` is `[link text](URL)` followed by `[link text 2](URL2)` on a new line, `convertMarkdown()` should return `<a href="URL">link text</a><a href="URL2">link text 2</a>`.
|
||||
|
||||
```js
|
||||
const input = document.querySelector("#markdown-input");
|
||||
@@ -731,7 +731,7 @@ assert.lengthOf(quotes, 1);
|
||||
assert.equal(quotes[0].innerText, "this is a quote");
|
||||
```
|
||||
|
||||
When the value of `#markdown-input` is `> this is a quote\n> this is another quote`, `convertMarkdown()` should return `<blockquote>this is a quote</blockquote><blockquote>this is another quote</blockquote>`.
|
||||
When the value of `#markdown-input` is `> this is a quote` followed by `> this is another quote` on a new line, `convertMarkdown()` should return `<blockquote>this is a quote</blockquote><blockquote>this is another quote</blockquote>`.
|
||||
|
||||
```js
|
||||
const input = document.querySelector("#markdown-input");
|
||||
|
||||
Reference in New Issue
Block a user