Skip to content

Commit 18578fd

Browse files
committed
fix issue
1 parent 823545a commit 18578fd

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

utils/documentCompiler.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,13 @@ const utilityTagCompiler = (contents: string) => {
4949

5050
const assetTagComipler = (contents: string) => {
5151
return contents
52-
.replace(/< \{(.*?)\}>(.*?)<\/>/g, '<img style="width: $1" src="$2" />')
52+
.replace(
53+
/< \{(.*?)\}>(.*?)<\/>/g,
54+
'<img style="max-width: 100%; width: $1" src="$2" />',
55+
)
5356
.replace(
5457
/< \{(.*?)\}>(.*?)<\/>/g,
55-
'<video style="width: $1" src="$2" controls /></video>',
58+
'<video style="max-width: 100%; width: $1" src="$2" controls /></video>',
5659
);
5760
};
5861

0 commit comments

Comments
 (0)