@affanhamid/markdown-renderer 2.1.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -1
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -922,6 +922,7 @@ function renderMarkdownToHtml(markdown, options) {
|
|
|
922
922
|
}
|
|
923
923
|
var MarkdownRenderer = ({
|
|
924
924
|
markdown,
|
|
925
|
+
className,
|
|
925
926
|
onRunCode,
|
|
926
927
|
executableLanguages = ["python", "r"]
|
|
927
928
|
}) => {
|
|
@@ -1103,7 +1104,7 @@ var MarkdownRenderer = ({
|
|
|
1103
1104
|
alive = false;
|
|
1104
1105
|
};
|
|
1105
1106
|
}, [html]);
|
|
1106
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ref: containerRef, dangerouslySetInnerHTML: { __html: html } });
|
|
1107
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ref: containerRef, className, dangerouslySetInnerHTML: { __html: html } });
|
|
1107
1108
|
};
|
|
1108
1109
|
var markdown_renderer_default = MarkdownRenderer;
|
|
1109
1110
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/index.d.cts
CHANGED
|
@@ -7,13 +7,14 @@ interface CodeExecutionResult {
|
|
|
7
7
|
}
|
|
8
8
|
interface MarkdownRendererProps {
|
|
9
9
|
markdown: string;
|
|
10
|
+
className?: string;
|
|
10
11
|
onRunCode?: (code: string, language: string) => Promise<CodeExecutionResult>;
|
|
11
12
|
executableLanguages?: string[];
|
|
12
13
|
}
|
|
13
14
|
declare function renderMarkdownToHtml(markdown: string, options?: {
|
|
14
15
|
executableLanguages?: string[];
|
|
15
16
|
}): string;
|
|
16
|
-
declare const MarkdownRenderer: ({ markdown, onRunCode, executableLanguages, }: MarkdownRendererProps) => react_jsx_runtime.JSX.Element;
|
|
17
|
+
declare const MarkdownRenderer: ({ markdown, className, onRunCode, executableLanguages, }: MarkdownRendererProps) => react_jsx_runtime.JSX.Element;
|
|
17
18
|
|
|
18
19
|
declare function normalizeMathMarkdownDelimiters(markdown: string): string;
|
|
19
20
|
declare const MATH_MARKDOWN_RULES_APPENDIX = "Math formatting rules (must follow):\n- Inline math: use single-dollar delimiters like $...$.\n- Display math: use $$ delimiters on their own lines with nothing else on those lines.\n- Do not use \\(...\\) or \\[...\\] delimiters.\n- Do not place display-math $$...$$ inside bullets or table cells; use inline $...$ there.\n- Escape non-math currency dollars as \\$.";
|
package/dist/index.d.ts
CHANGED
|
@@ -7,13 +7,14 @@ interface CodeExecutionResult {
|
|
|
7
7
|
}
|
|
8
8
|
interface MarkdownRendererProps {
|
|
9
9
|
markdown: string;
|
|
10
|
+
className?: string;
|
|
10
11
|
onRunCode?: (code: string, language: string) => Promise<CodeExecutionResult>;
|
|
11
12
|
executableLanguages?: string[];
|
|
12
13
|
}
|
|
13
14
|
declare function renderMarkdownToHtml(markdown: string, options?: {
|
|
14
15
|
executableLanguages?: string[];
|
|
15
16
|
}): string;
|
|
16
|
-
declare const MarkdownRenderer: ({ markdown, onRunCode, executableLanguages, }: MarkdownRendererProps) => react_jsx_runtime.JSX.Element;
|
|
17
|
+
declare const MarkdownRenderer: ({ markdown, className, onRunCode, executableLanguages, }: MarkdownRendererProps) => react_jsx_runtime.JSX.Element;
|
|
17
18
|
|
|
18
19
|
declare function normalizeMathMarkdownDelimiters(markdown: string): string;
|
|
19
20
|
declare const MATH_MARKDOWN_RULES_APPENDIX = "Math formatting rules (must follow):\n- Inline math: use single-dollar delimiters like $...$.\n- Display math: use $$ delimiters on their own lines with nothing else on those lines.\n- Do not use \\(...\\) or \\[...\\] delimiters.\n- Do not place display-math $$...$$ inside bullets or table cells; use inline $...$ there.\n- Escape non-math currency dollars as \\$.";
|
package/dist/index.js
CHANGED
|
@@ -883,6 +883,7 @@ function renderMarkdownToHtml(markdown, options) {
|
|
|
883
883
|
}
|
|
884
884
|
var MarkdownRenderer = ({
|
|
885
885
|
markdown,
|
|
886
|
+
className,
|
|
886
887
|
onRunCode,
|
|
887
888
|
executableLanguages = ["python", "r"]
|
|
888
889
|
}) => {
|
|
@@ -1064,7 +1065,7 @@ var MarkdownRenderer = ({
|
|
|
1064
1065
|
alive = false;
|
|
1065
1066
|
};
|
|
1066
1067
|
}, [html]);
|
|
1067
|
-
return /* @__PURE__ */ jsx("div", { ref: containerRef, dangerouslySetInnerHTML: { __html: html } });
|
|
1068
|
+
return /* @__PURE__ */ jsx("div", { ref: containerRef, className, dangerouslySetInnerHTML: { __html: html } });
|
|
1068
1069
|
};
|
|
1069
1070
|
var markdown_renderer_default = MarkdownRenderer;
|
|
1070
1071
|
export {
|