Skip to content

Commit 2545378

Browse files
authored
Reflex Markdown TLC (#6085)
* Reflex Markdown TLC * Bump to react-markdown 10.0.0, bump all plugins to latest versions * component_map: "codemap" with "pre" for simpler handling of inline vs code block * Add new `rx.markdown.plugin` function to allow easily loading remark and rehype plugins * Add new `MarkdownWrapper` since the new react-markdown doesn't accept css/className * Add `use_math`, `use_gfm`, `use_raw` and friends to customize default plugins BREAKING: children for textual components is now a bare string instead of a list of str * uprev to react-markdown 10.1.0 * remove markdown related packages from outdated dependencies exclusion list * avoid blind .pop in Markdown.create * Update test_markdown assertions * Ensure comments are accurate
1 parent 726711e commit 2545378

6 files changed

Lines changed: 227 additions & 109 deletions

File tree

.github/workflows/check_outdated_dependencies.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ jobs:
7777
echo "$outdated"
7878
7979
# Ignore 3rd party dependencies that are not updated.
80-
filtered_outdated=$(echo "$outdated" | grep -vE 'Package|@chakra-ui|lucide-react|@splinetool/runtime|ag-grid-react|framer-motion|react-markdown|remark-math|remark-gfm|rehype-katex|rehype-raw|remark-unwrap-images|ag-grid' || true)
80+
filtered_outdated=$(echo "$outdated" | grep -vE 'Package|@chakra-ui|lucide-react|@splinetool/runtime|ag-grid-react|framer-motion|ag-grid' || true)
8181
no_extra=$(echo "$filtered_outdated" | grep -vE '\|\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-' || true)
8282
8383

pyi_hashes.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"reflex/components/el/elements/typography.pyi": "684e83dde887dba12badd0fb75c87c04",
4141
"reflex/components/gridjs/datatable.pyi": "98a7e1b3f3b60cafcdfcd8879750ee42",
4242
"reflex/components/lucide/icon.pyi": "9cdd1107295f5c4b6d5d6516f487f237",
43-
"reflex/components/markdown/markdown.pyi": "2f84254a548e908020949564fc289339",
43+
"reflex/components/markdown/markdown.pyi": "dd74e8e9665b2a813ff799a7aa190b44",
4444
"reflex/components/moment/moment.pyi": "e1952f1c2c82cef85d91e970d1be64ab",
4545
"reflex/components/plotly/plotly.pyi": "4311a0aae2abcc9226abb6a273f96372",
4646
"reflex/components/radix/__init__.pyi": "5d8e3579912473e563676bfc71f29191",
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
"""Markdown components."""
22

3-
from .markdown import Markdown
4-
5-
markdown = Markdown.create
3+
from .markdown import markdown as markdown

0 commit comments

Comments
 (0)