feat: enhance markdown rendering with GFM plugins and image handling

This commit is contained in:
Mauricio Siu
2025-03-02 17:12:46 -06:00
parent 7741c94d0b
commit b19d453682
5 changed files with 40 additions and 81 deletions

50
pnpm-lock.yaml generated
View File

@@ -11,19 +11,6 @@ overrides:
importers:
.:
dependencies:
prism-react-renderer:
specifier: ^2.4.1
version: 2.4.1(react@18.3.1)
react-markdown:
specifier: ^10.0.0
version: 10.0.0(@types/react@18.3.5)(react@18.3.1)
rehype-raw:
specifier: ^7.0.0
version: 7.0.0
remark-gfm:
specifier: ^4.0.1
version: 4.0.1
devDependencies:
'@biomejs/biome':
specifier: 1.8.3
@@ -179,9 +166,18 @@ importers:
react-ga4:
specifier: ^2.1.0
version: 2.1.0
react-markdown:
specifier: ^10.0.0
version: 10.0.0(@types/react@18.3.5)(react@18.2.0)
react-photo-view:
specifier: ^1.2.7
version: 1.2.7(react-dom@18.2.0(react@18.2.0))(react@18.2.0)
rehype-raw:
specifier: ^7.0.0
version: 7.0.0
remark-gfm:
specifier: ^4.0.1
version: 4.0.1
shiki:
specifier: 1.22.2
version: 1.22.2
@@ -197,6 +193,9 @@ importers:
turndown:
specifier: ^7.2.0
version: 7.2.0
turndown-plugin-gfm:
specifier: ^1.0.2
version: 1.0.2
typescript:
specifier: 5.1.6
version: 5.1.6
@@ -1660,9 +1659,6 @@ packages:
'@types/node@22.9.0':
resolution: {integrity: sha512-vuyHg81vvWA1Z1ELfvLko2c8f34gyA0zaic0+Rllc5lbCnbSyuvb2Oxpm6TAUAC/2xZN3QGqxBNggD1nNR2AfQ==}
'@types/prismjs@1.26.5':
resolution: {integrity: sha512-AUZTa7hQ2KY5L7AmtSiqxlhWxb4ina0yd8hNbl4TWuqnv/pFP0nDMb3YrfSBf4hJVGLh2YEIBfKaBW/9UEl6IQ==}
'@types/prop-types@15.7.12':
resolution: {integrity: sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q==}
@@ -3127,11 +3123,6 @@ packages:
engines: {node: '>=14'}
hasBin: true
prism-react-renderer@2.4.1:
resolution: {integrity: sha512-ey8Ls/+Di31eqzUxC46h8MksNuGx/n0AAC8uKpwFau4RPDYLuE3EXTp8N8G2vX2N7UC/+IXeNUnlWBGGcAG+Ig==}
peerDependencies:
react: '>=16.0.0'
property-information@6.5.0:
resolution: {integrity: sha512-PgTgs/BlvHxOu8QuEN7wi5A0OmXaBcHpmCSTehcs6Uuu9IkDIEo13Hy7n898RHfrQ49vKCoGeWZSaAK01nwVig==}
@@ -3532,6 +3523,9 @@ packages:
engines: {node: '>=18.0.0'}
hasBin: true
turndown-plugin-gfm@1.0.2:
resolution: {integrity: sha512-vwz9tfvF7XN/jE0dGoBei3FXWuvll78ohzCZQuOb+ZjWrs3a0XhQVomJEb2Qh4VHTPNRO4GPZh0V7VRbiWwkRg==}
turndown@7.2.0:
resolution: {integrity: sha512-eCZGBN4nNNqM9Owkv9HAtWRYfLA4h909E/WGAWWBpmB275ehNhZyk87/Tpvjbp0jjNl9XwCsbe6bm6CqFsgD+A==}
@@ -5286,8 +5280,6 @@ snapshots:
dependencies:
undici-types: 6.19.8
'@types/prismjs@1.26.5': {}
'@types/prop-types@15.7.12': {}
'@types/react-dom@18.3.0':
@@ -7068,12 +7060,6 @@ snapshots:
prettier@3.3.3: {}
prism-react-renderer@2.4.1(react@18.3.1):
dependencies:
'@types/prismjs': 1.26.5
clsx: 2.1.1
react: 18.3.1
property-information@6.5.0: {}
property-information@7.0.0: {}
@@ -7104,7 +7090,7 @@ snapshots:
dependencies:
react: 18.3.1
react-markdown@10.0.0(@types/react@18.3.5)(react@18.3.1):
react-markdown@10.0.0(@types/react@18.3.5)(react@18.2.0):
dependencies:
'@types/hast': 3.0.4
'@types/mdast': 4.0.4
@@ -7113,7 +7099,7 @@ snapshots:
hast-util-to-jsx-runtime: 2.3.2
html-url-attributes: 3.0.1
mdast-util-to-hast: 13.2.0
react: 18.3.1
react: 18.2.0
remark-parse: 11.0.0
remark-rehype: 11.1.1
unified: 11.0.5
@@ -7598,6 +7584,8 @@ snapshots:
optionalDependencies:
fsevents: 2.3.3
turndown-plugin-gfm@1.0.2: {}
turndown@7.2.0:
dependencies:
'@mixmark-io/domino': 2.2.0