switching compiler options

This commit is contained in:
evilchili
2026-08-10 12:25:39 -07:00
parent 4bfaf1b23c
commit 1321d4fb81
8 changed files with 38 additions and 120 deletions
+6 -11
View File
@@ -1,14 +1,10 @@
"use strict";
/*
* hopdown.ts
* - Configurable markdown <=> HTML converter.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.HopDown = void 0;
exports.escapeHtml = escapeHtml;
const defaults_1 = require("./defaults");
const tokenizer_1 = require("./tokenizer");
function escapeHtml(source) {
import { defaultTags } from "./defaults";
import { Tokenizer } from "./tokenizer";
export function escapeHtml(source) {
return source
.replace(/&/g, '&amp;')
.replace(/</g, '&lt;')
@@ -37,13 +33,13 @@ function escapeHtml(source) {
* "</div>"
* );
*/
class HopDown {
export class HopDown {
tags;
referenceLinks = new Map();
tokenizer;
constructor(tags) {
this.tags = tags || defaults_1.defaultTags;
this.tokenizer = new tokenizer_1.Tokenizer(this.tags);
this.tags = tags || defaultTags;
this.tokenizer = new Tokenizer(this.tags);
}
/**
* Convert a markdown string to tokens.
@@ -380,4 +376,3 @@ class HopDown {
return result;
}
}
exports.HopDown = HopDown;