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

34 lines
1.1 KiB
TypeScript
Raw Normal View History

// Module ID: 4822
// Function ID: 4823
// Name: findCodedLinkUrls
// Dependencies: [4823, 7431, 5302, 13391, 13392, 2]
// Exports: default
// Module 4822 (findCodedLinkUrls)
import MarkupTypes from "MarkupTypes" /* 5302 */;
import findCodedLinkUrlsUsingRegexDefault from "findCodedLinkUrlsUsingRegex" /* 13392 */;
import size from "module_2" /* 2 */;
const result = size.fileFinishedImporting("modules/coded_links/findCodedLinkUrls.native.tsx");
export default function findCodedLinkUrls(content) {
2026-10-01 14:13:23 +00:00
let items;
let tmp = items;
const obj = items(13391);
if (obj.isFindCodedLinksRegexEnabled()) {
2026-10-01 14:13:23 +00:00
items = findCodedLinkUrlsUsingRegexDefault(content);
} else {
items = [];
const _default = tmp(4823).default;
2026-10-01 14:13:23 +00:00
const parseToASTResult = _default.parseToAST(content, true, { allowLinks: true });
const tmpResult = tmp(7431);
tmpResult.walkAst(parseToASTResult, (type) => {
const tmp = type.type === MarkupTypes.AST_KEY.LINK && typeof type.target === "string" && type.target.length > 0;
if (tmp) {
items.push(type.target);
}
});
}
return items;
};