Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warning for running docs by Eleventy #4066

Merged
merged 1 commit into from Nov 22, 2019

Conversation

HyunSangHan
Copy link
Contributor

@HyunSangHan HyunSangHan commented Oct 13, 2019

I was trying to build docs, I found the alert messages which are Language does not exist sh and Language does not exist text. When I use npm start docs, the alert messages come because of eleventy like below :

Hyunsangs-MacBookAir:mocha temp$ npm start docs

> mocha@6.2.0 start /Users/temp/Downloads/exercise/mocha
> nps "docs"

nps is executing `docs` : nps docs.prebuild && nps docs.api && eleventy && nps docs.linkcheck && nps docs.postbuild
nps is executing `docs.prebuild` : rimraf docs/_dist docs/_site && nps docs.preprocess
nps is executing `docs.preprocess` : md-magic --config ./scripts/markdown-magic.config.js --path docs/index.md
Starting markdown-magic docs/index.md
✔ docs/index.md Updated
 Transforms run
  ⁕ usage:executable=bin/mocha
  ⁕ toc:maxdepth=2&bullets=-
  ⁕ manifest:template=[gitter]: ${gitter}

Files processed. markdown-magic Finished! ⊂◉‿◉つ
nps is executing `docs.api` : nps docs.preprocess.api && jsdoc -c jsdoc.conf.json
nps is executing `docs.preprocess.api` : md-magic --config ./scripts/markdown-magic.config.js --path "docs/api-tutorials/*.md"
Starting markdown-magic docs/api-tutorials/*.md
✔ docs/api-tutorials/custom-reporter.md Updated
 Transforms run
  ⁕ file:src=../../test/integration/fixtures/simple-reporter.js&header=// my-reporter.js

Files processed. markdown-magic Finished! ⊂◉‿◉つ
Parsing /Users/temp/Downloads/exercise/mocha/lib/browser/growl.js ...
Parsing /Users/temp/Downloads/exercise/mocha/lib/browser/progress.js ...
Parsing /Users/temp/Downloads/exercise/mocha/lib/browser/tty.js ...
Parsing /Users/temp/Downloads/exercise/mocha/lib/cli/cli.js ...
Parsing /Users/temp/Downloads/exercise/mocha/lib/cli/collect-files.js ...
Parsing /Users/temp/Downloads/exercise/mocha/lib/cli/commands.js ...
Parsing /Users/temp/Downloads/exercise/mocha/lib/cli/config.js ...
Parsing /Users/temp/Downloads/exercise/mocha/lib/cli/index.js ...
Parsing /Users/temp/Downloads/exercise/mocha/lib/cli/init.js ...
Parsing /Users/temp/Downloads/exercise/mocha/lib/cli/node-flags.js ...
Parsing /Users/temp/Downloads/exercise/mocha/lib/cli/one-and-dones.js ...
Parsing /Users/temp/Downloads/exercise/mocha/lib/cli/options.js ...
Parsing /Users/temp/Downloads/exercise/mocha/lib/cli/run-helpers.js ...
Parsing /Users/temp/Downloads/exercise/mocha/lib/cli/run-option-metadata.js ...
Parsing /Users/temp/Downloads/exercise/mocha/lib/cli/run.js ...
Parsing /Users/temp/Downloads/exercise/mocha/lib/cli/watch-run.js ...
Parsing /Users/temp/Downloads/exercise/mocha/lib/context.js ...
Parsing /Users/temp/Downloads/exercise/mocha/lib/errors.js ...
Parsing /Users/temp/Downloads/exercise/mocha/lib/growl.js ...
Parsing /Users/temp/Downloads/exercise/mocha/lib/hook.js ...
Parsing /Users/temp/Downloads/exercise/mocha/lib/interfaces/bdd.js ...
Parsing /Users/temp/Downloads/exercise/mocha/lib/interfaces/common.js ...
Parsing /Users/temp/Downloads/exercise/mocha/lib/interfaces/exports.js ...
Parsing /Users/temp/Downloads/exercise/mocha/lib/interfaces/index.js ...
Parsing /Users/temp/Downloads/exercise/mocha/lib/interfaces/qunit.js ...
Parsing /Users/temp/Downloads/exercise/mocha/lib/interfaces/tdd.js ...
Parsing /Users/temp/Downloads/exercise/mocha/lib/mocha.js ...
Parsing /Users/temp/Downloads/exercise/mocha/lib/pending.js ...
Parsing /Users/temp/Downloads/exercise/mocha/lib/reporters/base.js ...
Parsing /Users/temp/Downloads/exercise/mocha/lib/reporters/doc.js ...
Parsing /Users/temp/Downloads/exercise/mocha/lib/reporters/dot.js ...
Parsing /Users/temp/Downloads/exercise/mocha/lib/reporters/html.js ...
Parsing /Users/temp/Downloads/exercise/mocha/lib/reporters/index.js ...
Parsing /Users/temp/Downloads/exercise/mocha/lib/reporters/json-stream.js ...
Parsing /Users/temp/Downloads/exercise/mocha/lib/reporters/json.js ...
Parsing /Users/temp/Downloads/exercise/mocha/lib/reporters/landing.js ...
Parsing /Users/temp/Downloads/exercise/mocha/lib/reporters/list.js ...
Parsing /Users/temp/Downloads/exercise/mocha/lib/reporters/markdown.js ...
Parsing /Users/temp/Downloads/exercise/mocha/lib/reporters/min.js ...
Parsing /Users/temp/Downloads/exercise/mocha/lib/reporters/nyan.js ...
Parsing /Users/temp/Downloads/exercise/mocha/lib/reporters/progress.js ...
Parsing /Users/temp/Downloads/exercise/mocha/lib/reporters/spec.js ...
Parsing /Users/temp/Downloads/exercise/mocha/lib/reporters/tap.js ...
Parsing /Users/temp/Downloads/exercise/mocha/lib/reporters/xunit.js ...
Parsing /Users/temp/Downloads/exercise/mocha/lib/runnable.js ...
Parsing /Users/temp/Downloads/exercise/mocha/lib/runner.js ...
Parsing /Users/temp/Downloads/exercise/mocha/lib/stats-collector.js ...
Parsing /Users/temp/Downloads/exercise/mocha/lib/suite.js ...
Parsing /Users/temp/Downloads/exercise/mocha/lib/test.js ...
Parsing /Users/temp/Downloads/exercise/mocha/lib/utils.js ...
Generating output files...
Finished running in 2.07 seconds.
Language does not exist sh
Language does not exist sh
Language does not exist sh
Language does not exist sh
Language does not exist sh
Language does not exist sh
Language does not exist sh
Language does not exist text
Language does not exist sh
Language does not exist sh
Language does not exist sh
Language does not exist sh
Language does not exist sh
Language does not exist sh

Description of the Change

It is the problem of code fences (triple backticks) for highlight.
Eleventy is using https://github.com/11ty/eleventy-plugin-syntaxhighlight for syntax highlight, which is utilising Prism(The supported languages are https://prismjs.com/#languages-list). That's why Eleventy doesn't take sh or text for highlight, but in docs/index.md, it is used sh(13 times), and text(1 time).
By using bash instead of sh, the alert messages for bash are gone.

  • NOTE : Because there was no word to substitute for text that ESLint allows, I didn't change it. I tried bash and shell to replace text, but it does not that look good when it is served on the browser. So, there is still one-line alert message that is Language does not exist text.

@HyunSangHan HyunSangHan changed the title Change sh to bash for code block in docs Change sh to bash for code block in docs/index.md Oct 13, 2019
@coveralls
Copy link

Coverage Status

Coverage increased (+0.07%) to 92.761% when pulling 3f2831a on HyunSangHan:docs-code-block into ec17f63 on mochajs:master.

@outsideris outsideris added area: documentation anything involving docs or mochajs.org semver-patch implementation requires increase of "patch" version number; "bug fixes" labels Oct 13, 2019
Copy link
Member

@outsideris outsideris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't known why Language does not exist messages are showed.

Thank you.

@boneskull
Copy link
Member

Thanks! LGTM

@boneskull boneskull merged commit 2e9c28a into mochajs:master Nov 22, 2019
@HyunSangHan HyunSangHan deleted the docs-code-block branch November 23, 2019 02:29
@craigtaub craigtaub added this to the next milestone Dec 1, 2019
@juergba juergba modified the milestones: next, v7.0.0 Jan 4, 2020
@HyunSangHan HyunSangHan changed the title Change sh to bash for code block in docs/index.md Fix warning for running docs by Eleventy Mar 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: documentation anything involving docs or mochajs.org semver-patch implementation requires increase of "patch" version number; "bug fixes"
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants