denoland / deno_doc

Documentation generator for Deno
MIT License
253 stars 54 forks source link

bug: comma in starting code snippet directive breaks syntax highlighting #583

Open iuioiua opened 3 months ago

iuioiua commented 3 months ago

The following docs:

/**
 * ```ts no-eval
 * import { concat } from "@std/bytes/concat";
 * import { assertEquals } from "@std/assert/assert-equals"
 *
 * const a = new Uint8Array([0, 1, 2]);
 * const b = new Uint8Array([3, 4, 5]);
 *
 * assertEquals(concat([a, b]), new Uint8Array([0, 1, 2, 3, 4, 5]));
 * ```
 */

Correctly renders, when using deno doc --html:

_Users_asher_GitHub_deno_std_docs_~_concat html

The following docs:

/**
 * ```ts, no-eval
 * import { concat } from "@std/bytes/concat";
 * import { assertEquals } from "@std/assert/assert-equals"
 *
 * const a = new Uint8Array([0, 1, 2]);
 * const b = new Uint8Array([3, 4, 5]);
 *
 * assertEquals(concat([a, b]), new Uint8Array([0, 1, 2, 3, 4, 5]));
 * ```
 */

Incorrectly renders, when using deno doc --html: _Users_asher_GitHub_deno_std_docs_~_concat html (1)