diff --git a/CHANGELOG.md b/CHANGELOG.md index 9214dcf..68bcf7f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -74,3 +74,8 @@ - Fixed inline HTML block element name from `InlineHTML` to `InlineHtml`. - Fixed comments being badly inserted inside documents. - Updated lib.html. + +### 2.1.1 + +- Fixed null tooltip handling. +- Updated lib.html. diff --git a/deno.lock b/deno.lock index 7ea5331..ce08e66 100644 --- a/deno.lock +++ b/deno.lock @@ -3,7 +3,7 @@ "packages": { "specifiers": { "jsr:@lambdaurora/lambdawebserver@^3.0.0": "jsr:@lambdaurora/lambdawebserver@3.0.0", - "jsr:@lambdaurora/libhtml@^1.1.3": "jsr:@lambdaurora/libhtml@1.1.3", + "jsr:@lambdaurora/libhtml@^1.2.1": "jsr:@lambdaurora/libhtml@1.2.1", "jsr:@luca/esbuild-deno-loader@^0.10.3": "jsr:@luca/esbuild-deno-loader@0.10.3", "jsr:@oak/commons@0.10": "jsr:@oak/commons@0.10.1", "jsr:@oak/oak@^16.0.0": "jsr:@oak/oak@16.0.0", @@ -52,8 +52,8 @@ "jsr:@std/path@^0.225.1" ] }, - "@lambdaurora/libhtml@1.1.3": { - "integrity": "06ab98c56a17091edc4f975f6e7920b7e2b83941126c4e55f0464502254d6438" + "@lambdaurora/libhtml@1.2.1": { + "integrity": "b2317e44caa5cb6d5f5d311c38f07d68bdabc8f34192abc0a9e2b500442566d7" }, "@luca/esbuild-deno-loader@0.10.3": { "integrity": "32fc93f7e7f78060234fd5929a740668aab1c742b808c6048b57f9aaea514921", diff --git a/import_map.json b/import_map.json index 0f07047..7698d0b 100644 --- a/import_map.json +++ b/import_map.json @@ -1,6 +1,6 @@ { "imports": { - "@lambdaurora/libhtml": "jsr:@lambdaurora/libhtml@^1.1.3", + "@lambdaurora/libhtml": "jsr:@lambdaurora/libhtml@^1.2.1", "@std/assert": "jsr:@std/assert@^0.225.3", "@std/fs": "jsr:@std/fs@^0.229.1", "@oak/oak": "jsr:@oak/oak@^16.0.0", diff --git a/lib/tree/base.ts b/lib/tree/base.ts index 3453ed6..a5f7606 100644 --- a/lib/tree/base.ts +++ b/lib/tree/base.ts @@ -196,7 +196,11 @@ export class Reference { * @return `true` if this reference has a tooltip, or `false` otherwise. */ public has_tooltip(): boolean { - return this.tooltip !== undefined && this.tooltip !== ""; + if (this.tooltip) { + return true; + } else { + return false; + } } public toString(): string { diff --git a/test/footnote.test.ts b/test/footnote.test.ts index 8206fde..2646b1d 100644 --- a/test/footnote.test.ts +++ b/test/footnote.test.ts @@ -34,12 +34,18 @@ Deno.test("Renderer > footnotes", () => {


    -
  1. Simple text -
  2. -
  3. Fancy name footnote. -
  4. -
  5. Moar text -
  6. +
  7. + Simple text + +
  8. +
  9. + Fancy name footnote. + +
  10. +
  11. + Moar text + +
`); });