wip; tests passing

This commit is contained in:
evilchili
2026-05-15 14:34:20 -07:00
parent 9748d12ede
commit c61b8e2f8b
10 changed files with 110 additions and 585 deletions
+4 -1
View File
@@ -1,11 +1,14 @@
import { ribbit } from './setup';
const lib = ribbit();
const hopdown = new lib.HopDown();
const editor = new lib.Editor({});
const hopdown = editor.converter;
const H = (md: string) => hopdown.toHTML(md);
const M = (html: string) => hopdown.toMarkdown(html);
const rt = (md: string) => M(H(md));
describe('Markdown → HTML', () => {
describe('inline formatting', () => {
it('bold', () => expect(H('**bold**')).toBe('<p><strong>bold</strong></p>'));