Skip to content

Commit

Permalink
fix: regex mismatch in text block (#1597)
Browse files Browse the repository at this point in the history
  • Loading branch information
mfarhan943 authored Jan 30, 2025
1 parent b7241a1 commit 31f39cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/editors/sharedComponents/TinyMceWidget/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const parseAssetName = (relativeUrl) => {
let assetName = '';
if (relativeUrl.match(/\/asset-v1:\S+[+]\S+[@]\S+[+]\S+\/\w/)?.length >= 1) {
const assetBlockName = relativeUrl.substring(0, relativeUrl.search(/("|")/));
const dividedSrc = assetBlockName.split(/\/asset-v1:\S+[+]\S+[@]\S+[+]\S+\//);
const dividedSrc = assetBlockName.split(/\/asset-v1:\S+[+]\S+[@]\S+[+]\S+[/@]/);
[, assetName] = dividedSrc;
} else {
const assetBlockName = relativeUrl.substring(relativeUrl.indexOf('@') + 1, relativeUrl.search(/("|")/));
Expand Down

0 comments on commit 31f39cb

Please sign in to comment.