diff --git a/packages/bbob-preset-html5/src/defaultTags.ts b/packages/bbob-preset-html5/src/defaultTags.ts
index 8ef7d02..51f6580 100644
--- a/packages/bbob-preset-html5/src/defaultTags.ts
+++ b/packages/bbob-preset-html5/src/defaultTags.ts
@@ -107,6 +107,7 @@ export const defaultTags = (function createTags() {
toNode(
"img",
{
+ ...node.attrs,
src: render(node.content),
},
null
diff --git a/packages/bbob-preset-html5/test/index.test.ts b/packages/bbob-preset-html5/test/index.test.ts
index 9d82ce8..1cb8e00 100644
--- a/packages/bbob-preset-html5/test/index.test.ts
+++ b/packages/bbob-preset-html5/test/index.test.ts
@@ -62,6 +62,13 @@ describe('@bbob/preset-html5', () => {
expect(parse(input)).toBe(result);
});
+ test('[img width="100" height="50" alt="Lubeck city gate" title="This is one of the medieval city gates of Lubeck"]https://www.bbcode.org/images/lubeck_small.jpg[/img]', () => {
+ const input = '[img width="100" height="50" alt="Lubeck city gate" title="This is one of the medieval city gates of Lubeck"]https://www.bbcode.org/images/lubeck_small.jpg[/img]';
+ const result = '
';
+
+ expect(parse(input)).toBe(result);
+ });
+
test('[quote="author"]quoted text[/quote]', () => {
const input = '[quote="author"]quoted text[/quote]';
const result = '
';quoted text