diff --git a/server.js b/server.js index df975c8cfd180..9a4bf55afd2ea 100644 --- a/server.js +++ b/server.js @@ -105,7 +105,7 @@ http.createServer((req, res) => { req.url = '/en' } mount(req, res, redirectToEnglishUrl(req, res)) -}).listen(port, () => console.log(`\x1B[32mServer running at http://localhost:${port}/en/\x1B[39m`)) +}).listen(port, () => console.log(`Server running at http://localhost:${port}/en/`)) // Start the initial build of static HTML pages build.fullBuild() diff --git a/tests/scripts/anchor-mardown-headings.test.js b/tests/scripts/anchor-mardown-headings.test.js index eb7e41e19cbbc..64c944f80a208 100644 --- a/tests/scripts/anchor-mardown-headings.test.js +++ b/tests/scripts/anchor-mardown-headings.test.js @@ -6,7 +6,7 @@ test('anchorMarkdownHeadings', (t) => { const anchorMarkdownHeadings = require('../../scripts/plugins/anchor-markdown-headings') t.plan(4) - t.test('correctly pharses markdown heading without links', (t) => { + t.test('Correctly pharses markdown heading without links', (t) => { const text = 'Simple title' const level = 1 const raw = 'Simple title' @@ -19,7 +19,7 @@ test('anchorMarkdownHeadings', (t) => { t.equal(output, expected) }) - t.test('correctly pharses markdown heading with a single link', (t) => { + t.test('Correctly pharses markdown heading with a single link', (t) => { const text = 'Title with link' const level = 3 const raw = 'Title with [link](#)' @@ -33,7 +33,7 @@ test('anchorMarkdownHeadings', (t) => { t.equal(output, expected) }) - t.test('correctly pharses markdown heading with multiple links', (t) => { + t.test('Correctly pharses markdown heading with multiple links', (t) => { const text = 'a b cde' const level = 2 const raw = 'a [b](b) c[d](d)e' @@ -47,7 +47,7 @@ test('anchorMarkdownHeadings', (t) => { t.equal(output, expected) }) - t.test('makes pretty slugs', (t) => { + t.test('Makes pretty slugs', (t) => { const text = '$$$ WIN BIG! $$$' const level = 4 const raw = '$$$ WIN BIG! $$$' @@ -59,4 +59,17 @@ test('anchorMarkdownHeadings', (t) => { t.plan(1) t.equal(output, expected) }) + + t.test('Makes pretty slugs', (t) => { + const text = '$$$ WIN BIG!! $$$' + const level = 4 + const raw = '$$$ WIN BIG!! $$$' + const output = anchorMarkdownHeadings(text, level, raw) + const expected = '