Files
homebrewery/tests/markdown/basic.test.js
T
2026-08-25 12:49:22 -05:00

18 lines
721 B
JavaScript

import { hbfm } from 'hbmarkedwrapper';
test('Processes the markdown within an HTML block if its just a class wrapper', function() {
const source = '<div>*Bold text*</div>';
const rendered = hbfm.render(source);
expect(rendered).toBe('<div> <p><em>Bold text</em></p>\n </div>');
});
// TEST REMOVED AS IT IS NO LONGER REQUIRED
//
// test('Check markdown is using the custom renderer; specifically that it adds target=_self attribute to internal links in HTML blocks', function() {
// const source = '<div>[Has _self Attribute?](#p1)</div>';
// const rendered = hbfm.render(source);
// expect(rendered).toBe('<div> <p><a href="#p1" target="_self">Has _self Attribute?</a></p>\n </div>');
// });