diff --git a/frontend/src/components/UserGuideModal.js b/frontend/src/components/UserGuideModal.js index 123b93d..cdac66c 100644 --- a/frontend/src/components/UserGuideModal.js +++ b/frontend/src/components/UserGuideModal.js @@ -145,9 +145,38 @@ export default function UserGuideModal({ isOpen, onClose }) { ) : (

{children}

, - h2: ({ children }) =>

{children}

, - h3: ({ children }) =>

{children}

, + h1: ({ children }) => { + const id = String(children).toLowerCase().replace(/\s+/g, '-').replace(/[^\w-]/g, ''); + return

{children}

; + }, + h2: ({ children }) => { + const id = String(children).toLowerCase().replace(/\s+/g, '-').replace(/[^\w-]/g, ''); + return

{children}

; + }, + h3: ({ children }) => { + const id = String(children).toLowerCase().replace(/\s+/g, '-').replace(/[^\w-]/g, ''); + return

{children}

; + }, + a: ({ href, children }) => { + // Handle internal anchor links — scroll within the modal + if (href && href.startsWith('#')) { + return ( + { + e.preventDefault(); + const targetId = href.slice(1); + const el = document.getElementById(targetId); + if (el) el.scrollIntoView({ behavior: 'smooth', block: 'start' }); + }} + style={{ color: '#7DD3FC', textDecoration: 'none', borderBottom: '1px solid rgba(125,211,252,0.3)' }} + > + {children} + + ); + } + return {children}; + }, p: ({ children }) =>

{children}

, li: ({ children }) =>
  • {children}
  • , ul: ({ children }) => ,