decord/alpha/source/modules/coded_links/findCodedLinkUrls.native.tsx

33 lines
1.1 KiB
TypeScript

// Module ID: 4711
// Function ID: 4712
// Name: findCodedLinkUrls
// Dependencies: [4712, 8208, 5165, 14055, 14056, 2]
// Exports: default
// Module 4711 (findCodedLinkUrls)
import MarkupTypes from "MarkupTypes" /* 5165 */;
import findCodedLinkUrlsUsingRegexDefault from "findCodedLinkUrlsUsingRegex" /* 14056 */;
import size from "module_2" /* 2 */;
const result = size.fileFinishedImporting("modules/coded_links/findCodedLinkUrls.native.tsx");
export default function findCodedLinkUrls(content) {
if (obj.isFindCodedLinksRegexEnabled()) {
let items = findCodedLinkUrlsUsingRegexDefault(content);
} else {
items = [];
const _default = tmp(4712).default;
const parseToASTResult = tmp(4712).default.parseToAST(content, true, { allowLinks: true });
tmp(8208).walkAst(parseToASTResult, (type) => {
let tmp = type.type === MarkupTypes.AST_KEY.LINK && typeof type.target === "string";
if (tmp) {
tmp = type.target.length > 0;
}
if (tmp) {
items.push(type.target);
}
});
const tmpResult = tmp(8208);
}
return items;
};