diff --git a/scm-ui/ui-components/src/MarkdownView.tsx b/scm-ui/ui-components/src/MarkdownView.tsx index e46c95370a..946fdc37c9 100644 --- a/scm-ui/ui-components/src/MarkdownView.tsx +++ b/scm-ui/ui-components/src/MarkdownView.tsx @@ -32,7 +32,7 @@ import MarkdownHeadingRenderer from "./MarkdownHeadingRenderer"; import { create } from "./MarkdownLinkRenderer"; import {useTranslation, WithTranslation, withTranslation} from "react-i18next"; import Notification from "./Notification"; -import { createTransformer } from "./remarkCommitLinksParser"; +import { createTransformer } from "./remarkChangesetShortLinkParser"; type Props = RouteComponentProps & WithTranslation & { content: string; diff --git a/scm-ui/ui-components/src/remarkCommitLinksParser.test.ts b/scm-ui/ui-components/src/remarkChangesetShortLinkParser.test.ts similarity index 97% rename from scm-ui/ui-components/src/remarkCommitLinksParser.test.ts rename to scm-ui/ui-components/src/remarkChangesetShortLinkParser.test.ts index a0af2aeee9..0e2211f3d0 100644 --- a/scm-ui/ui-components/src/remarkCommitLinksParser.test.ts +++ b/scm-ui/ui-components/src/remarkChangesetShortLinkParser.test.ts @@ -22,7 +22,7 @@ * SOFTWARE. */ -import { regExpPattern } from "./remarkCommitLinksParser"; +import { regExpPattern } from "./remarkChangesetShortLinkParser"; describe("Remark Commit Links RegEx Tests", () => { it("should match simple names", () => { diff --git a/scm-ui/ui-components/src/remarkCommitLinksParser.ts b/scm-ui/ui-components/src/remarkChangesetShortLinkParser.ts similarity index 99% rename from scm-ui/ui-components/src/remarkCommitLinksParser.ts rename to scm-ui/ui-components/src/remarkChangesetShortLinkParser.ts index fa26c793db..f9995e7131 100644 --- a/scm-ui/ui-components/src/remarkCommitLinksParser.ts +++ b/scm-ui/ui-components/src/remarkChangesetShortLinkParser.ts @@ -30,7 +30,6 @@ import { TFunction } from "i18next"; const namePartRegex = nameRegex.source.substring(1, nameRegex.source.length - 1); -// Visible for testing export const regExpPattern = `(${namePartRegex})\\/(${namePartRegex})@([\\w\\d]+)`; function match(value: string): RegExpMatchArray[] { @@ -45,7 +44,6 @@ function match(value: string): RegExpMatchArray[] { } export const createTransformer = (t: TFunction): MdastPlugin => { - return (tree: MarkdownAbstractSyntaxTree) => { visit(tree, "text", (node: MarkdownAbstractSyntaxTree, index: number, parent: MarkdownAbstractSyntaxTree) => { if (parent.type === "link" || !node.value) {