Skip to content

Commit c1cfab7

Browse files
committed
Set image float by default
1 parent 854f5c9 commit c1cfab7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/parse.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ export function parse(data: string, config: Config = {}): Result {
9292
imageData.type = { framed: 'frame', thumbnail: 'thumb' }[param] || param;
9393
if (imageData.type === 'thumb') {
9494
imageData.hasCaption = true;
95+
imageData.float ??= 'right';
9596
}
9697
}
9798
else if (param.endsWith('px')) {
@@ -129,6 +130,7 @@ export function parse(data: string, config: Config = {}): Result {
129130
display: inline-block;
130131
float: ${imageData.float || 'none'};
131132
vertical-align: ${imageData.align || 'unset'};
133+
background: #fff;
132134
${imageData.style || ''}
133135
"
134136
>

0 commit comments

Comments
 (0)