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

34 lines
1.1 KiB
TypeScript
Raw Normal View History

2026-10-02 13:37:24 +00:00
// Module ID: 4823
// Function ID: 4824
// Name: findCodedLinkUrls
2026-10-02 13:37:24 +00:00
// Dependencies: [4824, 7435, 5303, 13393, 13394, 2]
// Exports: default
2026-10-02 13:37:24 +00:00
// Module 4823 (findCodedLinkUrls)
import MarkupTypes from "MarkupTypes" /* 5303 */;
import findCodedLinkUrlsUsingRegexDefault from "findCodedLinkUrlsUsingRegex" /* 13394 */;
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;
2026-10-02 13:37:24 +00:00
const obj = items(13393);
if (obj.isFindCodedLinksRegexEnabled()) {
2026-10-01 14:13:23 +00:00
items = findCodedLinkUrlsUsingRegexDefault(content);
} else {
items = [];
2026-10-02 13:37:24 +00:00
const _default = tmp(4824).default;
2026-10-01 14:13:23 +00:00
const parseToASTResult = _default.parseToAST(content, true, { allowLinks: true });
2026-10-02 13:37:24 +00:00
const tmpResult = tmp(7435);
2026-10-01 14:13:23 +00:00
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;
};