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

34 lines
1.1 KiB
TypeScript
Raw Normal View History

// Module ID: 4746
// Function ID: 4747
2026-08-25 06:04:03 +00:00
// Name: findCodedLinkUrls
// Dependencies: [4747, 8251, 5208, 14122, 14123, 2]
2026-08-25 06:04:03 +00:00
// Exports: default
// Module 4746 (findCodedLinkUrls)
import MarkupTypes from "MarkupTypes" /* 5208 */;
import findCodedLinkUrlsUsingRegexDefault from "findCodedLinkUrlsUsingRegex" /* 14123 */;
import size from "module_2" /* 2 */;
2026-08-25 06:04:03 +00:00
const result = size.fileFinishedImporting("modules/coded_links/findCodedLinkUrls.native.tsx");
2026-08-25 06:04:03 +00:00
export default function findCodedLinkUrls(content) {
if (obj.isFindCodedLinksRegexEnabled()) {
let items = findCodedLinkUrlsUsingRegexDefault(content);
2026-08-25 06:04:03 +00:00
} else {
items = [];
const _default = tmp(4747).default;
const parseToASTResult = tmp(4747).default.parseToAST(content, true, { allowLinks: true });
tmp(8251).walkAst(parseToASTResult, (type) => {
let tmp = type.type === MarkupTypes.AST_KEY.LINK && typeof type.target === "string";
2026-08-25 06:04:03 +00:00
if (tmp) {
tmp = type.target.length > 0;
}
if (tmp) {
items.push(type.target);
}
});
const tmpResult = tmp(8251);
2026-08-25 06:04:03 +00:00
}
return items;
};