diff --git a/packages/x-components/build/docgen/templates/docgen-component.template.js b/packages/x-components/build/docgen/templates/docgen-component.template.js
index 738811be3b..cede006cb1 100644
--- a/packages/x-components/build/docgen/templates/docgen-component.template.js
+++ b/packages/x-components/build/docgen/templates/docgen-component.template.js
@@ -1,13 +1,17 @@
+// eslint-disable-next-line @typescript-eslint/no-var-requires
+const { removeLinks } = require('../utils');
+
function createComponentTemplate(renderedUsage, doc) {
const { displayName, description, docsBlocks } = doc;
const title = kebabToPascalCase(displayName);
+ const modifiedDescription = removeLinks(description);
return `
---
title: ${title}
---
# ${title}
- ${description || ''}
+ ${modifiedDescription || ''}
${renderedUsage.props}
${renderedUsage.methods}
diff --git a/packages/x-components/build/docgen/templates/docgen-props.template.js b/packages/x-components/build/docgen/templates/docgen-props.template.js
index a75d8af25b..de4ec37edb 100644
--- a/packages/x-components/build/docgen/templates/docgen-props.template.js
+++ b/packages/x-components/build/docgen/templates/docgen-props.template.js
@@ -1,7 +1,7 @@
/* eslint-disable @typescript-eslint/explicit-function-return-type */
// eslint-disable-next-line @typescript-eslint/no-var-requires
-const { cleanMarkdown } = require('../utils');
+const { cleanMarkdown, removeLinks } = require('../utils');
/**
* Function to overwrite props template on vue-docgen.
@@ -33,7 +33,7 @@ function toPropsMarkdownTable({ name = '', type = {}, defaultValue = {}, descrip
const value = defaultValue.value ? defaultValue.value : '';
return `| ${cleanMarkdown(name)}
| ${cleanMarkdown(
- description
+ removeLinks(description)
)} | ${cleanMarkdown(typeName)}
| ${cleanMarkdown(value)}
|`;
}
diff --git a/packages/x-components/build/docgen/utils.js b/packages/x-components/build/docgen/utils.js
index 5efc29bc4f..2ce0f457f4 100644
--- a/packages/x-components/build/docgen/utils.js
+++ b/packages/x-components/build/docgen/utils.js
@@ -12,6 +12,18 @@ function cleanMarkdown(input) {
return input.replace(/\r?\n/g, '
').replace(/\|/g, '\\|');
}
+/**
+ * Replaces all the `{@link Component}` appearances to not be shown on generated docs.
+ *
+ * @param input - Input to be cleaned.
+ * @returns String cleaned markdown compatible string.
+ *
+ * @internal
+ */
+function removeLinks(input) {
+ return input.replace(/{@link /g, '').replace(/}/g, '');
+}
+
const COMPONENTS_DOC_FOLDER = 'API-reference/components';
/**
@@ -60,6 +72,7 @@ function generateDestination(folder, regex, file) {
module.exports = {
cleanMarkdown,
+ removeLinks,
getDocumentFileDestination,
COMPONENTS_DOC_FOLDER
};
diff --git a/packages/x-components/src/components/animations/staggering-transition-group.vue b/packages/x-components/src/components/animations/staggering-transition-group.vue
index e1e62cd299..b4d7b03666 100644
--- a/packages/x-components/src/components/animations/staggering-transition-group.vue
+++ b/packages/x-components/src/components/animations/staggering-transition-group.vue
@@ -432,7 +432,7 @@
}
/**
- * Vue's VNode {@link https://vuejs.org/v2/api/#transition | transition} data props and events.
+ * Vue's VNode {@link https://vuejs.org/v2/api/#transition} data props and events.
*/
interface TransitionData {
name?: string;
diff --git a/packages/x-components/src/components/base-event-button.vue b/packages/x-components/src/components/base-event-button.vue
index 6228299e38..fc09926443 100644
--- a/packages/x-components/src/components/base-event-button.vue
+++ b/packages/x-components/src/components/base-event-button.vue
@@ -12,7 +12,7 @@
/**
* Component to be reused that renders a `