Skip to content

Commit

Permalink
feat(breaking): individual style property override
Browse files Browse the repository at this point in the history
  • Loading branch information
gmsgowtham committed Aug 24, 2023
1 parent 3be7203 commit 2c6b553
Show file tree
Hide file tree
Showing 5 changed files with 87 additions and 93 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-marked",
"version": "5.2.0-rc.0",
"version": "5.2.0-rc.1",
"description": "Markdown renderer for React Native powered by marked.js",
"main": "dist/commonjs/index",
"module": "dist/module/index",
Expand Down
2 changes: 0 additions & 2 deletions src/lib/__tests__/Markdown.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,6 @@ describe("Renderer override", () => {
);
const tree = r.toJSON();
expect(tree).toMatchSnapshot();
expect(fn).toHaveBeenCalledWith("hello", style);
expect(screen.queryByText("hello")).toBeTruthy();
});
});
Expand Down Expand Up @@ -860,7 +859,6 @@ describe("Tokenizer", () => {
);
const tree = r.toJSON();
expect(tree).toMatchSnapshot();
expect(codespanFn).toHaveBeenCalledWith("hello", style);
expect(customFn).toHaveBeenCalledWith("latex", "$ latex code $", [], {
text: "latex code",
});
Expand Down
20 changes: 20 additions & 0 deletions src/lib/__tests__/__snapshots__/Markdown.spec.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -10117,7 +10117,12 @@ exports[`Renderer override Custom 1`] = `
<Text
style={
{
"backgroundColor": "#f6f8fa",
"color": "#ff0000",
"fontSize": 16,
"fontStyle": "italic",
"fontWeight": "300",
"lineHeight": 24,
}
}
>
Expand Down Expand Up @@ -10173,7 +10178,12 @@ exports[`Renderer override Custom 1`] = `
<Text
style={
{
"backgroundColor": "#f6f8fa",
"color": "#ff0000",
"fontSize": 16,
"fontStyle": "italic",
"fontWeight": "300",
"lineHeight": 24,
}
}
>
Expand Down Expand Up @@ -14111,7 +14121,12 @@ exports[`Tokenizer Custom 1`] = `
<Text
style={
{
"backgroundColor": "#f6f8fa",
"color": "#ff0000",
"fontSize": 16,
"fontStyle": "italic",
"fontWeight": "300",
"lineHeight": 24,
}
}
>
Expand Down Expand Up @@ -14192,7 +14207,12 @@ exports[`Tokenizer Custom 1`] = `
<Text
style={
{
"backgroundColor": "#f6f8fa",
"color": "#ff0000",
"fontSize": 16,
"fontStyle": "italic",
"fontWeight": "300",
"lineHeight": 24,
}
}
>
Expand Down
Loading

0 comments on commit 2c6b553

Please sign in to comment.