summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Matthew Phillips <matthew@skypack.dev> 2023-06-09 07:41:08 +0300
committerGravatar GitHub <noreply@github.com> 2023-06-09 07:41:08 +0300
commit3d9a392a09133aeb7a6efeb59c307f27a9b83198 (patch)
treefebb8d4e94c00503acae6e729032af2c7f66d3ad
parente3271f8c167288dc60b94242d01d459c162ec06d (diff)
downloadastro-3d9a392a09133aeb7a6efeb59c307f27a9b83198.tar.gz
astro-3d9a392a09133aeb7a6efeb59c307f27a9b83198.tar.zst
astro-3d9a392a09133aeb7a6efeb59c307f27a9b83198.zip
Remove error message for using Markdown component (#7343)
-rw-r--r--.changeset/modern-turkeys-shop.md5
-rw-r--r--packages/markdown/component/Markdown.astro8
2 files changed, 6 insertions, 7 deletions
diff --git a/.changeset/modern-turkeys-shop.md b/.changeset/modern-turkeys-shop.md
new file mode 100644
index 000000000..758236619
--- /dev/null
+++ b/.changeset/modern-turkeys-shop.md
@@ -0,0 +1,5 @@
+---
+'@astrojs/markdown-component': patch
+---
+
+Fix Markdown component error message false positive
diff --git a/packages/markdown/component/Markdown.astro b/packages/markdown/component/Markdown.astro
index c581c72b0..ac0cf5861 100644
--- a/packages/markdown/component/Markdown.astro
+++ b/packages/markdown/component/Markdown.astro
@@ -3,13 +3,6 @@ export interface Props {
content?: string;
}
-// NOTE(fks): We are most likely moving this component out of Astro core
-// in a few weeks. Checking the name like this is a bit of a hack, but we
-// intentionally don't want to add an SSR flag for others to read from, just yet.
-if (Astro.redirect.name !== '_onlyAvailableInSSR') {
- console.error(`\x1B[31mThe <Markdown> component is not available in SSR. See https://github.com/withastro/rfcs/discussions/179 for more info.\x1B[39m`);
-}
-
const dedent = (str: string) => {
const _str = str.split('\n').filter(s => s.trimStart().length > 0);
if (_str.length === 0) {
@@ -24,6 +17,7 @@ const dedent = (str: string) => {
// Internal props that should not be part of the external interface.
interface InternalProps extends Props {
+ class: string;
$scope: string;
}