Skip to content

Commit

Permalink
Merge pull request #170 from Team-INSERT/hotfix/width
Browse files Browse the repository at this point in the history
fix issue
  • Loading branch information
Ubinquitous authored Nov 27, 2024
2 parents 7669450 + 18578fd commit dae2b9a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions utils/documentCompiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,13 @@ const utilityTagCompiler = (contents: string) => {

const assetTagComipler = (contents: string) => {
return contents
.replace(/<사진 \{(.*?)\}>(.*?)<\/사진>/g, '<img style="width: $1" src="$2" />')
.replace(
/<사진 \{(.*?)\}>(.*?)<\/사진>/g,
'<img style="max-width: 100%; width: $1" src="$2" />',
)
.replace(
/<비디오 \{(.*?)\}>(.*?)<\/비디오>/g,
'<video style="width: $1" src="$2" controls /></video>',
'<video style="max-width: 100%; width: $1" src="$2" controls /></video>',
);
};

Expand Down

0 comments on commit dae2b9a

Please sign in to comment.