fix(learn): preserve whitespace in the tool panel (#39973)

This commit is contained in:
Oliver Eyton-Williams
2020-10-14 18:10:15 +02:00
committed by GitHub
parent 3106fe804f
commit a71150074d
5 changed files with 8 additions and 4 deletions

View File

@ -28,7 +28,7 @@ if (condition1) {
## Instructions
<section id='instructions'>
Write chained <code>if</code>/<code>else if</code> statements to fulfill the following conditions:
<code>num &lt; 5</code> - return "Tiny"<br><code>num &lt; 10</code> - return "Small"<br><code>num &lt; 15</code> - return "Medium"<br><code>num &lt; 20</code> - return "Large"<br><code>num >= 20</code> - return "Huge"
<code>num &lt; 5</code> - return "Tiny"<br><code>num &lt; 10</code> - return "Small"<br><code>num &lt; 15</code> - return "Medium"<br><code>num &lt; 20</code> - return "Large"<br><code>num >= 20</code> - return "Huge"
</section>
## Tests

View File

@ -30,7 +30,7 @@ tests:
testString: assert(!code.match(/\.?[\s\S]*?replace/g));
- text: <code>urlSlug("Winter Is Coming")</code> should return <code>"winter-is-coming"</code>.
testString: assert(urlSlug("Winter Is Coming") === "winter-is-coming");
- text: <code>urlSlug(" Winter Is &nbsp;Coming")</code> should return <code>"winter-is-coming"</code>.
- text: <code>urlSlug(" Winter Is Coming")</code> should return <code>"winter-is-coming"</code>.
testString: assert(urlSlug(" Winter Is Coming") === "winter-is-coming");
- text: <code>urlSlug("A Mind Needs Books Like A Sword Needs A Whetstone")</code> should return <code>"a-mind-needs-books-like-a-sword-needs-a-whetstone"</code>.
testString: assert(urlSlug("A Mind Needs Books Like A Sword Needs A Whetstone") === "a-mind-needs-books-like-a-sword-needs-a-whetstone");