clenemt / docdash

:zap: Lodash inspired JSDoc 3 template/theme
http://clenemt.github.io/docdash/
Other
824 stars 201 forks source link

Fix CSS to correctly display <pre><code>...</code></pre>? #102

Closed Pomax closed 2 years ago

Pomax commented 3 years ago

JSdoc with traditional HTML code formatting (<pre><code>...</code></pre>) seems to render incorrectly, coloring the code's text as if it's inline text rather than ensuring a solid background for the entire <pre> block .

This can be seen using, for example, the following jsdoc comment:

  /**
   * This symbol can be used to create models with missing
   * "required" fields. Note that this value is inherited,
   * and so can be referenced from your own model's name
   * rather than using Model.ALLOW_INCOMPLETE.
   *
   * E.g.
   *
   * <pre><code>
   *   class Something extends Model {
   *     // ...
   *   }
   *
   *   Something.create(undefined, Something.ALLOW_INCOMPLETE);
   * </code></pre>
   */
  static ALLOW_INCOMPLETE = Symbol();

This yields:

image