diff options
Diffstat (limited to 'vhosts/blog')
| -rw-r--r-- | vhosts/blog/nuldoc-src/errors.ts | 4 | ||||
| -rw-r--r-- | vhosts/blog/nuldoc-src/ndoc/document.ts | 6 | ||||
| -rw-r--r-- | vhosts/blog/nuldoc-src/ndoc/to_html.ts | 6 | ||||
| -rw-r--r-- | vhosts/blog/nuldoc-src/renderers/html.ts | 4 |
4 files changed, 10 insertions, 10 deletions
diff --git a/vhosts/blog/nuldoc-src/errors.ts b/vhosts/blog/nuldoc-src/errors.ts index fa535836..1692a4c8 100644 --- a/vhosts/blog/nuldoc-src/errors.ts +++ b/vhosts/blog/nuldoc-src/errors.ts @@ -1,6 +1,6 @@ -export class DocBookError extends Error { +export class NuldocError extends Error { static { - this.prototype.name = "DocBookError"; + this.prototype.name = "NuldocError"; } } diff --git a/vhosts/blog/nuldoc-src/ndoc/document.ts b/vhosts/blog/nuldoc-src/ndoc/document.ts index f1cdede9..26c00784 100644 --- a/vhosts/blog/nuldoc-src/ndoc/document.ts +++ b/vhosts/blog/nuldoc-src/ndoc/document.ts @@ -1,6 +1,6 @@ import { join } from "std/path/mod.ts"; import { Config } from "../config.ts"; -import { DocBookError } from "../errors.ts"; +import { NuldocError } from "../errors.ts"; import { Revision, stringToDate } from "../revision.ts"; import { Element, findFirstChildElement } from "../dom.ts"; import { z } from "zod/mod.ts"; @@ -40,8 +40,8 @@ export function createNewDocumentFromRootElement( ): Document { const article = findFirstChildElement(root, "article"); if (!article) { - throw new DocBookError( - `[docbook.new] <article> element not found`, + throw new NuldocError( + `[nuldoc.new] <article> element not found`, ); } diff --git a/vhosts/blog/nuldoc-src/ndoc/to_html.ts b/vhosts/blog/nuldoc-src/ndoc/to_html.ts index 16315a09..ddb041d5 100644 --- a/vhosts/blog/nuldoc-src/ndoc/to_html.ts +++ b/vhosts/blog/nuldoc-src/ndoc/to_html.ts @@ -1,7 +1,7 @@ // @deno-types="../types/highlight-js.d.ts" import hljs from "highlight.js"; import { Document } from "./document.ts"; -import { DocBookError } from "../errors.ts"; +import { NuldocError } from "../errors.ts"; import { addClass, Element, @@ -86,8 +86,8 @@ function setSectionTitleAnchor(doc: Document) { if (c.name === "h") { const currentSection = sectionStack[sectionStack.length - 1]; if (!currentSection) { - throw new DocBookError( - "[docbook.tohtml] <h> element must be inside <section>", + throw new NuldocError( + "[nuldoc.tohtml] <h> element must be inside <section>", ); } const sectionId = currentSection.attributes.get("id"); diff --git a/vhosts/blog/nuldoc-src/renderers/html.ts b/vhosts/blog/nuldoc-src/renderers/html.ts index 5f1342f1..f26a3f08 100644 --- a/vhosts/blog/nuldoc-src/renderers/html.ts +++ b/vhosts/blog/nuldoc-src/renderers/html.ts @@ -1,5 +1,5 @@ import { Element, forEachChild, Node, Text } from "../dom.ts"; -import { DocBookError } from "../errors.ts"; +import { NuldocError } from "../errors.ts"; export function renderHtml(root: Node): string { return `<!DOCTYPE html>\n` + nodeToHtmlText(root, { @@ -108,7 +108,7 @@ function getDtd(name: string): Dtd { case "ul": return { type: "block" }; default: - throw new DocBookError(`[html.write] Unknown element name: ${name}`); + throw new NuldocError(`[html.write] Unknown element name: ${name}`); } } |
