diff --git a/docs/deploy.md b/docs/deploy.md index 4072b404b..9ac3ca50f 100644 --- a/docs/deploy.md +++ b/docs/deploy.md @@ -7,14 +7,14 @@ Similar to [GitBook](https://www.gitbook.com), you can deploy files to GitHub Pa There are three places to populate your docs for your GitHub repository: - `docs/` folder -- master branch +- main branch - gh-pages branch -It is recommended that you save your files to the `./docs` subfolder of the `master` branch of your repository. Then select `master branch /docs folder` as your GitHub Pages source in your repository's settings page. +It is recommended that you save your files to the `./docs` subfolder of the `main` branch of your repository. Then select `main branch /docs folder` as your GitHub Pages source in your repository's settings page. ![GitHub Pages](_images/deploy-github-pages.png) -!> You can also save files in the root directory and select `master branch`. +!> You can also save files in the root directory and select `main branch`. You'll need to place a `.nojekyll` file in the deploy location (such as `/docs` or the gh-pages branch) ## GitLab Pages diff --git a/docs/write-a-plugin.md b/docs/write-a-plugin.md index 671b2625f..32b625d5b 100644 --- a/docs/write-a-plugin.md +++ b/docs/write-a-plugin.md @@ -22,6 +22,8 @@ window.$docsify = { Alternatively, a plugin can be stored in a separate file and "installed" using a standard `

"`; + +exports[`Emoji Ignores emoji shorthand codes in style url() values 1`] = `""`; + exports[`Emoji Ignores unmatched emoji shorthand codes 1`] = `"

hh:mm

hh:mm:ss

Namespace::SubNameSpace

Namespace::SubNameSpace::Class

2014-12-29T16:11:20+00:00

"`; exports[`Emoji Renders GitHub emoji images (nativeEmoji:false) 1`] = `"

\\"smile\\"

\\"smile\\"\\"smile\\"

\\"smile\\" \\"smile\\"

\\"smile\\"\\"smile\\"\\"smile\\"

\\"smile\\" \\"smile\\" \\"smile\\"

text\\"smile\\"

\\"smile\\"text

text\\"smile\\"text

"`; diff --git a/test/integration/emoji.test.js b/test/integration/emoji.test.js index e19ab8089..dfd8516ac 100644 --- a/test/integration/emoji.test.js +++ b/test/integration/emoji.test.js @@ -107,6 +107,59 @@ describe('Emoji', function () { expect(mainElm.innerHTML).toMatchSnapshot(); }); + test('Ignores emoji shorthand codes in URIs', async () => { + await docsifyInit({ + markdown: { + homepage: + 'Url https://docsify.js.org/:foo:/ http://docsify.js.org/:100:/ ftp://docsify.js.org/:smile:/', + }, + // _logHTML: true, + }); + + const mainElm = document.querySelector('#main'); + + expect(mainElm.innerHTML).toMatchSnapshot(); + }); + + test('Ignores emoji shorthand codes in URIs while handling anchor content', async () => { + await docsifyInit({ + markdown: { + homepage: 'Achor tags [:100:](http://docsify.js.org/:100:/)', + }, + // _logHTML: true, + }); + + const mainElm = document.querySelector('#main'); + + expect(mainElm.innerHTML).toMatchSnapshot(); + }); + + test('Ignores emoji shorthand codes in html attributes', async () => { + await docsifyInit({ + markdown: { + homepage: ` `, + }, + // _logHTML: true, + }); + + const mainElm = document.querySelector('#main'); + + expect(mainElm.innerHTML).toMatchSnapshot(); + }); + + test('Ignores emoji shorthand codes in style url() values', async () => { + await docsifyInit({ + markdown: { + homepage: ``, + }, + // _logHTML: true, + }); + + const mainElm = document.querySelector('#main'); + + expect(mainElm.innerHTML).toMatchSnapshot(); + }); + test('Ignores emoji shorthand codes in code, pre, script, and template tags', async () => { await docsifyInit({ markdown: {