Skip to content

Commit

Permalink
fix video
Browse files Browse the repository at this point in the history
  • Loading branch information
greggman committed Oct 31, 2023
1 parent b0bd43f commit 8071e41
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions build.js
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,7 @@ const Builder = function(outBaseDir, options) {
// happen in translations
const iframeLinkRE = /(<iframe[\s\S]*?\s+src=")(.*?)(")/g;
const imgLinkRE = /(<img[\s\S]*?\s+src=")(.*?)(")/g;
const videoLinkRE = /(<video[\s\S]*?\s+src=")(.*?)(")/g;
const aLinkRE = /(<a[^>]*?\s+href=")(.*?)(")/g;
const mdLinkRE = /(\[[\s\S]*?\]\()(.*?)(\))/g;
const handlebarLinkRE = /({{{.*?\s+url=")(.*?)(")/g;
Expand All @@ -528,6 +529,7 @@ const Builder = function(outBaseDir, options) {
const linkREs = [
iframeLinkRE,
imgLinkRE,
videoLinkRE,
aLinkRE,
mdLinkRE,
handlebarLinkRE,
Expand All @@ -553,6 +555,7 @@ const Builder = function(outBaseDir, options) {

return content
.replace(imgLinkRE, fixRelLink)
.replace(videoLinkRE, fixRelLink)
.replace(aLinkRE, fixRelLink)
.replace(iframeLinkRE, fixRelLink)
.replace(scriptLinkRE, fixRelLink)
Expand Down

0 comments on commit 8071e41

Please sign in to comment.