Commit c4929f6
committed
refactor(Markdown.tsx): simplify customComponents type definition
Remove unnecessary type imports from react-markdown and simplify the
type definition for customComponents to use a more generic Record type.
This change reduces complexity and improves readability.
fix(Markdown.tsx): add type check for src before window.open
Ensure that src is a string before attempting to open it in a new
window. This prevents potential runtime errors if src is undefined or
not a string.
fix(Markdown.tsx): remove unused inline parameter from code component
Remove the unused inline parameter from the code component to clean up
the code and avoid confusion.
fix(Markdown.tsx): initialize copyTimeout with undefined
Explicitly initialize copyTimeout with undefined to ensure clarity and
prevent potential issues with uninitialized variables.1 parent d1afda0 commit c4929f6
1 file changed
+6
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | 5 | | |
8 | 6 | | |
9 | 7 | | |
| |||
22 | 20 | | |
23 | 21 | | |
24 | 22 | | |
25 | | - | |
26 | | - | |
27 | | - | |
| 23 | + | |
28 | 24 | | |
29 | 25 | | |
30 | 26 | | |
| |||
78 | 74 | | |
79 | 75 | | |
80 | 76 | | |
81 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
82 | 80 | | |
83 | 81 | | |
84 | 82 | | |
| |||
113 | 111 | | |
114 | 112 | | |
115 | 113 | | |
116 | | - | |
| 114 | + | |
117 | 115 | | |
118 | 116 | | |
119 | 117 | | |
| |||
141 | 139 | | |
142 | 140 | | |
143 | 141 | | |
144 | | - | |
| 142 | + | |
145 | 143 | | |
146 | 144 | | |
147 | 145 | | |
| |||
0 commit comments