mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2025-01-18 08:11:41 +01:00
Remove copy of MediaRepository mxcUrl parsing.
This commit is contained in:
parent
1435c2c9a2
commit
abd62373e5
@ -73,16 +73,6 @@ function parseCodeBlock(options, node) {
|
||||
return new CodeBlock(language, codeNode.textContent);
|
||||
}
|
||||
|
||||
// TODO: duplicated from MediaRepository. Extract somewhere.
|
||||
function parseMxcUrl(url) {
|
||||
const prefix = "mxc://";
|
||||
if (url.startsWith(prefix)) {
|
||||
return url.substr(prefix.length).split("/", 2);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
function parseImage(options, node) {
|
||||
const { result, mediaRepository } = options;
|
||||
const src = result.getAttributeValue(node, "src") || "";
|
||||
|
Loading…
x
Reference in New Issue
Block a user