From bbab3e707e05408813dee29494c846406b4ce54f Mon Sep 17 00:00:00 2001
From: Ayush <99096397+ayush4345@users.noreply.github.com>
Date: Tue, 27 Feb 2024 23:53:45 +0530
Subject: [PATCH] fixed markdown error
---
package.json | 1 +
pnpm-lock.yaml | 183 +++++++++++++++++++++++
src/components/blog/blogDetail.jsx | 5 +-
src/components/event/eventDetail.jsx | 5 +-
src/components/project/projectDetail.jsx | 5 +-
tailwind.config.js | 2 +-
6 files changed, 191 insertions(+), 10 deletions(-)
diff --git a/package.json b/package.json
index 136e9ba..6c2057f 100644
--- a/package.json
+++ b/package.json
@@ -41,6 +41,7 @@
"react-paginate": "^8.2.0",
"react-query": "^3.39.3",
"react-responsive": "^9.0.2",
+ "remark-gfm": "^4.0.0",
"tailwind": "^4.0.0",
"tailwind-merge": "^2.2.1",
"tailwindcss": "^3.4.1",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 3fda051..6f25d5f 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -98,6 +98,9 @@ dependencies:
react-responsive:
specifier: ^9.0.2
version: 9.0.2(react@18.2.0)
+ remark-gfm:
+ specifier: ^4.0.0
+ version: 4.0.0
tailwind:
specifier: ^4.0.0
version: 4.0.0
@@ -1639,6 +1642,11 @@ packages:
engines: {node: '>=0.8.0'}
dev: false
+ /escape-string-regexp@5.0.0:
+ resolution: {integrity: sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==}
+ engines: {node: '>=12'}
+ dev: false
+
/eslint-scope@5.1.1:
resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==}
engines: {node: '>=8.0.0'}
@@ -2724,6 +2732,10 @@ packages:
engines: {node: '>=16'}
dev: false
+ /markdown-table@3.0.3:
+ resolution: {integrity: sha512-Z1NL3Tb1M9wH4XESsCDEksWoKTdlUafKc4pt0GRwjUyXaCFZ+dc3g2erqB6zm3szA2IUSi7VnPI+o/9jnxh9hw==}
+ dev: false
+
/markdown-to-jsx@7.4.1(react@18.2.0):
resolution: {integrity: sha512-GbrbkTnHp9u6+HqbPRFJbObi369AgJNXi/sGqq5HRsoZW063xR1XDCaConqq+whfEIAlzB1YPnOgsPc7B7bc/A==}
engines: {node: '>= 10'}
@@ -2754,6 +2766,15 @@ packages:
unist-util-visit: 4.1.2
dev: false
+ /mdast-util-find-and-replace@3.0.1:
+ resolution: {integrity: sha512-SG21kZHGC3XRTSUhtofZkBzZTJNM5ecCi0SK2IMKmSXR8vO3peL+kb1O0z7Zl83jKtutG4k5Wv/W7V3/YHvzPA==}
+ dependencies:
+ '@types/mdast': 4.0.3
+ escape-string-regexp: 5.0.0
+ unist-util-is: 6.0.0
+ unist-util-visit-parents: 6.0.1
+ dev: false
+
/mdast-util-from-markdown@1.3.1:
resolution: {integrity: sha512-4xTO/M8c82qBcnQc1tgpNtubGUW/Y1tBQ1B0i5CtSoelOLKFYlElIr3bvgREYYO5iRqbMY1YuqZng0GVOI8Qww==}
dependencies:
@@ -2792,6 +2813,75 @@ packages:
- supports-color
dev: false
+ /mdast-util-gfm-autolink-literal@2.0.0:
+ resolution: {integrity: sha512-FyzMsduZZHSc3i0Px3PQcBT4WJY/X/RCtEJKuybiC6sjPqLv7h1yqAkmILZtuxMSsUyaLUWNp71+vQH2zqp5cg==}
+ dependencies:
+ '@types/mdast': 4.0.3
+ ccount: 2.0.1
+ devlop: 1.1.0
+ mdast-util-find-and-replace: 3.0.1
+ micromark-util-character: 2.1.0
+ dev: false
+
+ /mdast-util-gfm-footnote@2.0.0:
+ resolution: {integrity: sha512-5jOT2boTSVkMnQ7LTrd6n/18kqwjmuYqo7JUPe+tRCY6O7dAuTFMtTPauYYrMPpox9hlN0uOx/FL8XvEfG9/mQ==}
+ dependencies:
+ '@types/mdast': 4.0.3
+ devlop: 1.1.0
+ mdast-util-from-markdown: 2.0.0
+ mdast-util-to-markdown: 2.1.0
+ micromark-util-normalize-identifier: 2.0.0
+ transitivePeerDependencies:
+ - supports-color
+ dev: false
+
+ /mdast-util-gfm-strikethrough@2.0.0:
+ resolution: {integrity: sha512-mKKb915TF+OC5ptj5bJ7WFRPdYtuHv0yTRxK2tJvi+BDqbkiG7h7u/9SI89nRAYcmap2xHQL9D+QG/6wSrTtXg==}
+ dependencies:
+ '@types/mdast': 4.0.3
+ mdast-util-from-markdown: 2.0.0
+ mdast-util-to-markdown: 2.1.0
+ transitivePeerDependencies:
+ - supports-color
+ dev: false
+
+ /mdast-util-gfm-table@2.0.0:
+ resolution: {integrity: sha512-78UEvebzz/rJIxLvE7ZtDd/vIQ0RHv+3Mh5DR96p7cS7HsBhYIICDBCu8csTNWNO6tBWfqXPWekRuj2FNOGOZg==}
+ dependencies:
+ '@types/mdast': 4.0.3
+ devlop: 1.1.0
+ markdown-table: 3.0.3
+ mdast-util-from-markdown: 2.0.0
+ mdast-util-to-markdown: 2.1.0
+ transitivePeerDependencies:
+ - supports-color
+ dev: false
+
+ /mdast-util-gfm-task-list-item@2.0.0:
+ resolution: {integrity: sha512-IrtvNvjxC1o06taBAVJznEnkiHxLFTzgonUdy8hzFVeDun0uTjxxrRGVaNFqkU1wJR3RBPEfsxmU6jDWPofrTQ==}
+ dependencies:
+ '@types/mdast': 4.0.3
+ devlop: 1.1.0
+ mdast-util-from-markdown: 2.0.0
+ mdast-util-to-markdown: 2.1.0
+ transitivePeerDependencies:
+ - supports-color
+ dev: false
+
+ /mdast-util-gfm@3.0.0:
+ resolution: {integrity: sha512-dgQEX5Amaq+DuUqf26jJqSK9qgixgd6rYDHAv4aTBuA92cTknZlKpPfa86Z/s8Dj8xsAQpFfBmPUHWJBWqS4Bw==}
+ dependencies:
+ mdast-util-from-markdown: 2.0.0
+ mdast-util-gfm-autolink-literal: 2.0.0
+ mdast-util-gfm-footnote: 2.0.0
+ mdast-util-gfm-strikethrough: 2.0.0
+ mdast-util-gfm-table: 2.0.0
+ mdast-util-gfm-task-list-item: 2.0.0
+ mdast-util-to-markdown: 2.1.0
+ transitivePeerDependencies:
+ - supports-color
+ dev: false
+
/mdast-util-mdx-expression@1.3.2:
resolution: {integrity: sha512-xIPmR5ReJDu/DHH1OoIT1HkuybIfRGYRywC+gJtI7qHjCJp/M9jrmBEJW22O8lskDWm562BX2W8TiAwRTb0rKA==}
dependencies:
@@ -3049,6 +3139,78 @@ packages:
micromark-util-types: 2.0.0
dev: false
+ /micromark-extension-gfm-autolink-literal@2.0.0:
+ resolution: {integrity: sha512-rTHfnpt/Q7dEAK1Y5ii0W8bhfJlVJFnJMHIPisfPK3gpVNuOP0VnRl96+YJ3RYWV/P4gFeQoGKNlT3RhuvpqAg==}
+ dependencies:
+ micromark-util-character: 2.1.0
+ micromark-util-sanitize-uri: 2.0.0
+ micromark-util-symbol: 2.0.0
+ micromark-util-types: 2.0.0
+ dev: false
+
+ /micromark-extension-gfm-footnote@2.0.0:
+ resolution: {integrity: sha512-6Rzu0CYRKDv3BfLAUnZsSlzx3ak6HAoI85KTiijuKIz5UxZxbUI+pD6oHgw+6UtQuiRwnGRhzMmPRv4smcz0fg==}
+ dependencies:
+ devlop: 1.1.0
+ micromark-core-commonmark: 2.0.0
+ micromark-factory-space: 2.0.0
+ micromark-util-character: 2.1.0
+ micromark-util-normalize-identifier: 2.0.0
+ micromark-util-sanitize-uri: 2.0.0
+ micromark-util-symbol: 2.0.0
+ micromark-util-types: 2.0.0
+ dev: false
+
+ /micromark-extension-gfm-strikethrough@2.0.0:
+ resolution: {integrity: sha512-c3BR1ClMp5fxxmwP6AoOY2fXO9U8uFMKs4ADD66ahLTNcwzSCyRVU4k7LPV5Nxo/VJiR4TdzxRQY2v3qIUceCw==}
+ dependencies:
+ devlop: 1.1.0
+ micromark-util-chunked: 2.0.0
+ micromark-util-classify-character: 2.0.0
+ micromark-util-resolve-all: 2.0.0
+ micromark-util-symbol: 2.0.0
+ micromark-util-types: 2.0.0
+ dev: false
+
+ /micromark-extension-gfm-table@2.0.0:
+ resolution: {integrity: sha512-PoHlhypg1ItIucOaHmKE8fbin3vTLpDOUg8KAr8gRCF1MOZI9Nquq2i/44wFvviM4WuxJzc3demT8Y3dkfvYrw==}
+ dependencies:
+ devlop: 1.1.0
+ micromark-factory-space: 2.0.0
+ micromark-util-character: 2.1.0
+ micromark-util-symbol: 2.0.0
+ micromark-util-types: 2.0.0
+ dev: false
+
+ /micromark-extension-gfm-tagfilter@2.0.0:
+ resolution: {integrity: sha512-xHlTOmuCSotIA8TW1mDIM6X2O1SiX5P9IuDtqGonFhEK0qgRI4yeC6vMxEV2dgyr2TiD+2PQ10o+cOhdVAcwfg==}
+ dependencies:
+ micromark-util-types: 2.0.0
+ dev: false
+
+ /micromark-extension-gfm-task-list-item@2.0.1:
+ resolution: {integrity: sha512-cY5PzGcnULaN5O7T+cOzfMoHjBW7j+T9D2sucA5d/KbsBTPcYdebm9zUd9zzdgJGCwahV+/W78Z3nbulBYVbTw==}
+ dependencies:
+ devlop: 1.1.0
+ micromark-factory-space: 2.0.0
+ micromark-util-character: 2.1.0
+ micromark-util-symbol: 2.0.0
+ micromark-util-types: 2.0.0
+ dev: false
+
+ /micromark-extension-gfm@3.0.0:
+ resolution: {integrity: sha512-vsKArQsicm7t0z2GugkCKtZehqUm31oeGBV/KVSorWSy8ZlNAv7ytjFhvaryUiCUJYqs+NoE6AFhpQvBTM6Q4w==}
+ dependencies:
+ micromark-extension-gfm-autolink-literal: 2.0.0
+ micromark-extension-gfm-footnote: 2.0.0
+ micromark-extension-gfm-strikethrough: 2.0.0
+ micromark-extension-gfm-table: 2.0.0
+ micromark-extension-gfm-tagfilter: 2.0.0
+ micromark-extension-gfm-task-list-item: 2.0.1
+ micromark-util-combine-extensions: 2.0.0
+ micromark-util-types: 2.0.0
+ dev: false
+
/micromark-extension-mdx-expression@1.0.8:
resolution: {integrity: sha512-zZpeQtc5wfWKdzDsHRBY003H2Smg+PUi2REhqgIhdzAa5xonhP03FcXxqFSerFiNUr5AWmHpaNPQTBVOS4lrXw==}
dependencies:
@@ -4250,6 +4412,19 @@ packages:
set-function-name: 2.0.2
dev: false
+ /remark-gfm@4.0.0:
+ resolution: {integrity: sha512-U92vJgBPkbw4Zfu/IiW2oTZLSL3Zpv+uI7My2eq8JxKgqraFdU8YUGicEJCEgSbeaG+QDFqIcwwfMTOEelPxuA==}
+ dependencies:
+ '@types/mdast': 4.0.3
+ mdast-util-gfm: 3.0.0
+ micromark-extension-gfm: 3.0.0
+ remark-parse: 11.0.0
+ remark-stringify: 11.0.0
+ unified: 11.0.4
+ transitivePeerDependencies:
+ - supports-color
+ dev: false
+
/remark-mdx@2.3.0:
resolution: {integrity: sha512-g53hMkpM0I98MU266IzDFMrTD980gNF3BJnkyFcmN+dD873mQeD5rdMO3Y2X+x8umQfbSE0PcoEDl7ledSA+2g==}
dependencies:
@@ -4308,6 +4483,14 @@ packages:
vfile: 6.0.1
dev: false
+ /remark-stringify@11.0.0:
+ resolution: {integrity: sha512-1OSmLd3awB/t8qdoEOMazZkNsfVTeY4fTsgzcQFdXNq8ToTN4ZGwrMnlda4K6smTFKD+GRV6O48i6Z4iKgPPpw==}
+ dependencies:
+ '@types/mdast': 4.0.3
+ mdast-util-to-markdown: 2.1.0
+ unified: 11.0.4
+ dev: false
+
/remove-accents@0.5.0:
resolution: {integrity: sha512-8g3/Otx1eJaVD12e31UbJj1YzdtVvzH85HV7t+9MJYk/u3XmkOUJ5Ys9wQrf9PCPK8+xn4ymzqYCiZl6QWKn+A==}
dev: false
diff --git a/src/components/blog/blogDetail.jsx b/src/components/blog/blogDetail.jsx
index e9ce226..ed36839 100644
--- a/src/components/blog/blogDetail.jsx
+++ b/src/components/blog/blogDetail.jsx
@@ -1,9 +1,8 @@
"use client"
import { useEffect, useState } from "react";
-import Navbar from "@/components/Navbar/Navbar";
-import Footer from "@/components/footer";
import ReactMarkdown from "react-markdown";
+import gfm from 'remark-gfm'
import './styleblog.css'
// Import Tailwind CSS classes
import 'tailwindcss/tailwind.css';
@@ -76,7 +75,7 @@ const BlogId = ({ params }) => {
-
Loading...
diff --git a/src/components/event/eventDetail.jsx b/src/components/event/eventDetail.jsx index a057850..08ec4e9 100644 --- a/src/components/event/eventDetail.jsx +++ b/src/components/event/eventDetail.jsx @@ -1,8 +1,7 @@ // Import necessary modules "use client" import { useEffect, useState } from "react"; -import Navbar from "@/components/Navbar/Navbar"; -import Footer from "@/components/footer"; +import gfm from 'remark-gfm' import ReactMarkdown from "react-markdown"; import './styleblog.css' // Import Tailwind CSS classes @@ -73,7 +72,7 @@ const EventId = ({ params }) => { -Loading...
diff --git a/src/components/project/projectDetail.jsx b/src/components/project/projectDetail.jsx index 25aeeb7..30be31e 100644 --- a/src/components/project/projectDetail.jsx +++ b/src/components/project/projectDetail.jsx @@ -1,8 +1,7 @@ // Import necessary modules "use client" import { useEffect, useState } from "react"; -import Navbar from "@/components/Navbar/Navbar"; -import Footer from "@/components/footer"; +import gfm from 'remark-gfm' import ReactMarkdown from "react-markdown"; import './styleblog.css' // Import Tailwind CSS classes @@ -67,7 +66,7 @@ const ProjectId = ({ params }) => { -Loading...
diff --git a/tailwind.config.js b/tailwind.config.js index 876c611..196d713 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -43,5 +43,5 @@ module.exports = { }, }, }, - plugins: [require("tailwindcss-animate")], + plugins: [require("tailwindcss-animate"), require('@tailwindcss/typography')], } \ No newline at end of file