+
+
Change heading to "Heart Of Gold"
+
+
The starship Heart of Gold was the first spacecraft to make use of the Infinite Improbability Drive. The craft was stolen by then-President Zaphod Beeblebrox at the official launch of the ship, as he was supposed to be officiating the launch. Later, during the use of the Infinite Improbability Drive, the ship picked up Arthur Dent and Ford Prefect, who were floating unprotected in deep space in the same star sector, having just escaped the destruction of the same planet.
+
+
initialize repository
+
+
Added design docs
+
`;
+exports[`Storyshots SplitAndReplace Simple replacement 1`] = `
+Array [
+
+
+
+ So this is it,
+
+
+
+ said Arthur,
+
+
+
+ We are going to die.
+
+
+
,
+
+
+
+ Yes,
+
+
+
+ said Ford,
+
+
+
+ except... no! Wait a minute!
+
+
+
,
+]
+`;
+
exports[`Storyshots SyntaxHighlighter Go 1`] = `
{
it("should match simple names", () => {
@@ -58,8 +58,6 @@ describe("Remark Commit Links RegEx Tests", () => {
match = regExp.exec(text);
}
- console.log(matches)
-
expect(matches[0]).toBe("hitchhiker/heart-of-gold@42");
expect(matches[1]).toBe("hitchhiker/heart-of-gold@21");
});
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) {
diff --git a/scm-ui/ui-components/src/repos/changesets/ChangesetDescription.tsx b/scm-ui/ui-components/src/repos/changesets/ChangesetDescription.tsx
new file mode 100644
index 0000000000..3a76689eac
--- /dev/null
+++ b/scm-ui/ui-components/src/repos/changesets/ChangesetDescription.tsx
@@ -0,0 +1,49 @@
+/*
+ * MIT License
+ *
+ * Copyright (c) 2020-present Cloudogu GmbH and Contributors
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+import React, { FC } from "react";
+import { Changeset } from "@scm-manager/ui-types";
+import { useBinder } from "@scm-manager/ui-extensions";
+import { SplitAndReplace, Replacement } from "@scm-manager/ui-components";
+
+type Props = {
+ changeset: Changeset;
+ value: string;
+};
+
+const ChangesetDescription: FC
= ({ changeset, value }) => {
+ const binder = useBinder();
+
+ const replacements: ((changeset: Changeset, value: string) => Replacement[])[] = binder.getExtensions(
+ "changeset.description.tokens",
+ {
+ changeset,
+ value
+ }
+ );
+
+ return r(changeset, value))} />;
+};
+
+export default ChangesetDescription;
diff --git a/scm-ui/ui-components/src/repos/changesets/ChangesetRow.tsx b/scm-ui/ui-components/src/repos/changesets/ChangesetRow.tsx
index 0956f7f131..46a30a6fd4 100644
--- a/scm-ui/ui-components/src/repos/changesets/ChangesetRow.tsx
+++ b/scm-ui/ui-components/src/repos/changesets/ChangesetRow.tsx
@@ -34,6 +34,7 @@ import ChangesetId from "./ChangesetId";
import ChangesetAuthor from "./ChangesetAuthor";
import ChangesetTags from "./ChangesetTags";
import ChangesetButtonGroup from "./ChangesetButtonGroup";
+import ChangesetDescription from "./ChangesetDescription";
type Props = WithTranslation & {
repository: Repository;
@@ -100,7 +101,7 @@ class ChangesetRow extends React.Component {
-
+
@@ -114,28 +115,28 @@ class ChangesetRow extends React.Component {
}}
renderAll={false}
>
- {description.title}
+
-
+
-
+
-
+