File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717 < body >
1818 < div id ="root "> </ div >
1919 < script type ="module " src ="/src/main.jsx "> </ script >
20- < script src ="../path/to/flowbite/dist/flowbite.min.js "> </ script >
2120 </ body >
2221</ html >
Original file line number Diff line number Diff line change @@ -19,9 +19,9 @@ const DocDetail = () => {
1919 try {
2020 const response = await fetch ( `/posts/${ slug } .md` ) ;
2121 if ( ! response . ok ) {
22- throw new Error ( 'Network response was not ok' ) ;
22+ throw new Error ( `Failed to fetch content: ${ response . statusText } ` ) ;
2323 }
24- const text = await response . text ( ) ;
24+ const text = await response . text ( ) ; // Ensure you're reading text
2525 setContent ( text ) ;
2626 } catch ( error ) {
2727 setError ( error . message ) ;
@@ -33,6 +33,7 @@ const DocDetail = () => {
3333 fetchContent ( ) ;
3434 } , [ slug ] ) ;
3535
36+
3637 const extractHeadings = ( markdown ) => {
3738 const headings = [ ] ;
3839 const regex = / ^ # { 1 , 6 } \s + ( .* ) $ / gm;
You can’t perform that action at this time.
0 commit comments