Skip to content

Instantly share code, notes, and snippets.

@pbrisbin
Forked from ericclemmons/example.md
Last active April 23, 2020 10:54
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pbrisbin/af547405f03d7669d75b1736d7ccde49 to your computer and use it in GitHub Desktop.
Save pbrisbin/af547405f03d7669d75b1736d7ccde49 to your computer and use it in GitHub Desktop.
HTML5 <details> in GitHub

Using <details> in GitHub

Suppose you're opening an issue and there's a lot noisey logs that may be useful.

Rather than wrecking readability, wrap it in a <details> tag!

<details>
 <summary>Summary Goes Here</summary>
 ...this is hidden, collapsable content...
</details>

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details

Example

Hey guys, I just this problem with Node v4.1.1. Apparently you can't require files that don't exist! plz fix.

Stack Trace for `require('does.not.exist')`
require('does.not.exist')
Error: Cannot find module 'does.not.exist'
  at Function.Module._resolveFilename (module.js:336:15)
  at Function.Module._load (module.js:286:25)
  at Module.require (module.js:365:17)
  at require (module.js:384:17)
  at repl:1:1
  at REPLServer.defaultEval (repl.js:164:27)
  at bound (domain.js:250:14)
  at REPLServer.runBound [as eval] (domain.js:263:12)
  at REPLServer.<anonymous> (repl.js:393:12)
  at emitOne (events.js:82:20)
@pbrisbin
Copy link
Author

Updated so Markdown in body renders correctly (requires extra newlines).

Discovered markdown in summary does not work:

Requires the same extra newlines to fix rendering, but that then causes the initial extra newline to appear in the un-expanded content which is wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment