diff --git a/static/js/AddToSourceSheet.jsx b/static/js/AddToSourceSheet.jsx index fb308296e3..cd4440f6b0 100644 --- a/static/js/AddToSourceSheet.jsx +++ b/static/js/AddToSourceSheet.jsx @@ -132,7 +132,7 @@ class AddToSourceSheetBox extends Component { // validate texts corresponding to refs have no images before posting them to sheet for (let i = 0; i < refs.length; i++) { let ref = Sefaria.getRefFromCache(refs[i]); - if (ref && (Sefaria.isImage(ref.he) || Sefaria.isImage(ref.text))) { + if (ref && (Sefaria.isFullSegmentImage(ref.he) || Sefaria.isFullSegmentImage(ref.text))) { alert("We do not currently support adding images to source sheets."); return false; } diff --git a/static/js/sefaria/sefaria.js b/static/js/sefaria/sefaria.js index 25d5f10300..9698478df8 100644 --- a/static/js/sefaria/sefaria.js +++ b/static/js/sefaria/sefaria.js @@ -1013,10 +1013,6 @@ Sefaria = extend(Sefaria, { const pattern = /^\s*]*>\s*$/i; return pattern.test(text); }, - isImage: function(textChunk) { - const pattern = /]*>/i; - return pattern.test(textChunk); - }, getRefFromCache: function(ref) { if (!ref) return null; const versionedKey = this._refmap[this._refKey(ref)] || this._refmap[this._refKey(ref, {context:1})];