@thetimes/methode-parser
Advanced tools
Comparing version 6.2.0 to 6.2.1
@@ -28,3 +28,3 @@ "use strict"; | ||
}; | ||
exports.getSlug = (href) => { | ||
exports.getCanonicalId = (href) => { | ||
const slugChop = href.match(new RegExp(/[^/]*(?=(\/)?$)/)); | ||
@@ -41,7 +41,10 @@ if (slugChop && slugChop[0] !== "") { | ||
} | ||
const slug = exports.getSlug(href); | ||
const re = new RegExp(/^(?=.*\d)(?=.*[a-z]).{9}$/); | ||
const slugBits = slug.split("-"); | ||
const lastSlugBit = slugBits[slugBits.length - 1]; | ||
return !!lastSlugBit.match(re); | ||
const canonicalId = exports.getCanonicalId(href); | ||
if (!canonicalId || !canonicalId.includes("-")) { | ||
return false; | ||
} | ||
const fragments = canonicalId.split("-"); | ||
const lastFragment = fragments[fragments.length - 1]; | ||
const shortIdPattern = /^[bcdfghjklmnpqrstvwxz23567890]{9}([bcdfghjklmnpqrstvwxz23567890]{2})?$/; | ||
return !!lastFragment.match(shortIdPattern); | ||
}; | ||
@@ -60,3 +63,3 @@ const makeLink = (attributes) => { | ||
type: "article", | ||
canonicalId: exports.getSlug(href) | ||
canonicalId: exports.getCanonicalId(href) | ||
}; | ||
@@ -383,2 +386,2 @@ } | ||
}; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JlYXRlLXRhZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9jcmVhdGUtdGFnLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBUUEsTUFBTSxZQUFZLEdBQWtDO0lBQ2xELENBQUMsRUFBRSxNQUFNO0lBQ1QsQ0FBQyxFQUFFLE1BQU07SUFDVCxFQUFFLEVBQUUsT0FBTztJQUNYLEdBQUcsRUFBRSxPQUFPO0lBQ1osRUFBRSxFQUFFLFVBQVU7SUFDZCxRQUFRLEVBQUUsVUFBVTtJQUNwQixFQUFFLEVBQUUsVUFBVTtJ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DQUFDO1FBQ0osS0FBSyxXQUFXO1lBQ2QsT0FBTztnQkFDTCxJQUFJLEVBQUUsV0FBVztnQkFDakIsUUFBUTthQUNULENBQUM7UUFDSixLQUFLLGFBQWE7WUFDaEIsT0FBTztnQkFDTCxJQUFJLEVBQUUsYUFBYTtnQkFDbkIsUUFBUTthQUNULENBQUM7UUFDSixLQUFLLFFBQVE7WUFDWCxPQUFPO2dCQUNMLElBQUksRUFBRSxRQUFRO2dCQUNkLFFBQVE7YUFDVCxDQUFDO1FBQ0osS0FBSyxNQUFNO1lBQ1QsT0FBTztnQkFDTCxJQUFJLEVBQUUsTUFBTTtnQkFDWixVQUFVLEVBQUUsQ0FBQyxDQUFDLFVBQVU7Z0JBQ3hCLFFBQVE7YUFDVCxDQUFDO1FBQ0osS0FBSyxlQUFlO1lBQ2xCLE9BQU87Z0JBQ0wsSUFBSSxFQUFFLGVBQWU7Z0JBQ3JCLFFBQVE7YUFDVCxDQUFDO1FBQ0osS0FBSyxPQUFPO1lBQ1YsT0FBTztnQkFDTCxJQUFJLEVBQUUsT0FBTztnQkFDYixVQUFVLEVBQUUsQ0FBQyxDQUFDLFVBQVU7Z0JBQ3hCLFFBQVE7YUFDVCxDQUFDO1FBQ0osS0FBSyxzQkFBc0I7WUFDekIsT0FBTztnQkFDTCxJQUFJLEVBQUUsc0JBQXNCO2dCQUM1QixRQUFRO2FBQ1QsQ0FBQztRQUNKO1lBQ0UsT0FBTztnQkFDTCxJQUFJLEVBQUUsU0FBUztnQkFDZixVQUFVLEVBQUU7b0JBQ1YsSUFBSSxFQUFFLENBQUMsQ0FBQyxVQUFVLENBQUMsSUFBSSxJQUFJLEVBQUU7aUJBQzlCO2dCQUNELFFBQVE7YUFDVCxDQUFDO0tBQ0w7QUFDSCxDQUFDLENBQUMifQ== |
import { XMLNode, MarkupElement } from "./markup"; | ||
export declare const getSlug: (href: string) => string; | ||
export declare const getCanonicalId: (href: string) => string; | ||
export declare const hasShortId: (href: string) => boolean; | ||
export declare const createTag: ({ name, attributes }: XMLNode, children?: MarkupElement[], parent?: import("./markup").Unknown | import("./markup").Ad | import("./markup").Author | import("./markup").Block | import("./markup").Bold | import("./markup").Break | import("./markup").Emphasis | import("./markup").Heading1 | import("./markup").Heading2 | import("./markup").Heading3 | import("./markup").Heading4 | import("./markup").Heading5 | import("./markup").Heading6 | import("./markup").Image | import("./markup").Inline | import("./markup").Interactive | import("./markup").Italic | import("./markup").KeyFacts | import("./markup").Link | import("./markup").ListElement | import("./markup").OrderedList | import("./markup").Paywall | import("./markup").Paragraph | import("./markup").PullQuote | import("./markup").Subscript | import("./markup").Superscript | import("./markup").Strong | import("./markup").Text | import("./markup").UnorderedList | import("./markup").Video | import("./markup").WordBreakOpportunity | MarkupElement[] | undefined) => MarkupElement; | ||
export declare const addChildren: (x: MarkupElement, children: MarkupElement[]) => MarkupElement; |
{ | ||
"name": "@thetimes/methode-parser", | ||
"version": "6.2.0", | ||
"version": "6.2.1", | ||
"main": "lib/index.js", | ||
@@ -5,0 +5,0 @@ "typings": "lib/types/index.d.ts", |
58048
1033