Remove extra imports from rx.markdown (#1837)
This commit is contained in:
parent
1430075bdc
commit
9e533ee58a
@ -34,13 +34,6 @@ class Markdown(Component):
|
|||||||
|
|
||||||
library = "react-markdown@^8.0.7"
|
library = "react-markdown@^8.0.7"
|
||||||
|
|
||||||
lib_dependencies: List[str] = [
|
|
||||||
"rehype-katex@^6.0.3",
|
|
||||||
"remark-math@^5.1.1",
|
|
||||||
"rehype-raw@^6.1.1",
|
|
||||||
"remark-gfm@^3.0.1",
|
|
||||||
]
|
|
||||||
|
|
||||||
tag = "ReactMarkdown"
|
tag = "ReactMarkdown"
|
||||||
|
|
||||||
is_default = True
|
is_default = True
|
||||||
@ -103,11 +96,15 @@ class Markdown(Component):
|
|||||||
imports = super()._get_imports()
|
imports = super()._get_imports()
|
||||||
|
|
||||||
# Special markdown imports.
|
# Special markdown imports.
|
||||||
imports["remark-math"] = {ImportVar(tag="remarkMath", is_default=True)}
|
imports.update(
|
||||||
imports["remark-gfm"] = {ImportVar(tag="remarkGfm", is_default=True)}
|
{
|
||||||
imports["rehype-katex"] = {ImportVar(tag="rehypeKatex", is_default=True)}
|
"": {ImportVar(tag="katex/dist/katex.min.css")},
|
||||||
imports["rehype-raw"] = {ImportVar(tag="rehypeRaw", is_default=True)}
|
"rehype-katex@^6.0.3": {ImportVar(tag="rehypeKatex", is_default=True)},
|
||||||
imports[""] = {ImportVar(tag="katex/dist/katex.min.css")}
|
"remark-math@^5.1.1": {ImportVar(tag="remarkMath", is_default=True)},
|
||||||
|
"rehype-raw@^6.1.1": {ImportVar(tag="rehypeRaw", is_default=True)},
|
||||||
|
"remark-gfm@^3.0.1": {ImportVar(tag="remarkGfm", is_default=True)},
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
# Get the imports for each component.
|
# Get the imports for each component.
|
||||||
for component in components_by_tag.values():
|
for component in components_by_tag.values():
|
||||||
|
Loading…
Reference in New Issue
Block a user