UNPKG

react-floating-profile

Version:

React component to display your github profile <p align="left"> <a href="https://www.npmjs.com/package/react-floating-profile"><img src="https://flat.badgen.net/npm/v/react-floating-profile" alt="react-floating-profile version" /></a> <a href="http

14 lines (13 loc) 727 B
import { jsx as _jsx } from "react/jsx-runtime"; import Markdown from "react-markdown"; import rehypeRaw from "rehype-raw"; import remarkGemoji from "remark-gemoji"; import remarkDirective from "remark-directive"; export default function ReadMe(_a) { var content = _a.content; return (_jsx(Markdown, { className: "readme-container", remarkPlugins: [remarkGemoji, remarkDirective], children: convertGitHubImageUrls(content), rehypePlugins: [rehypeRaw] })); } // 실제 이미지 데이터 가져오도록 하는 코드 function convertGitHubImageUrls(readmeContent) { return readmeContent.replace(/https:\/\/github\.com\/([^/]+)\/([^/]+)\/blob\/([^"]+)/g, "https://raw.githubusercontent.com/$1/$2/refs/heads/$3"); }