Skip to content

Commit dae2b9a

Browse files
authored
Merge pull request #170 from Team-INSERT/hotfix/width
fix issue
2 parents 7669450 + 18578fd commit dae2b9a

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)