Skip to content

Commit

Permalink
Merge pull request #730 from endp01/patch-1
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
gmsgowtham authored Sep 29, 2024
2 parents c0102dd + acc8f5f commit 65f2e9a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ Overriding default codespan tokenizer to include LaTeX.

import React, { ReactNode } from "react";
import Markdown, { Renderer, MarkedTokenizer, MarkedLexer } from "react-native-marked";
import type { RendererInterface, type CustomToken, } from "react-native-marked";
import type { RendererInterface, CustomToken } from "react-native-marked";

class CustomTokenizer extends MarkedTokenizer<CustomToken> {
// Override
Expand All @@ -231,6 +231,7 @@ class CustomTokenizer extends MarkedTokenizer<CustomToken> {
class CustomRenderer extends Renderer implements RendererInterface {
// Custom Token implementation
custom(identifier: string, _raw: string, _children?: ReactNode[], args?: Record<string, unknown>): ReactNode {
const text = args?.text as string;
if (identifier === "latex") {
const styles = {
padding: 16,
Expand Down

0 comments on commit 65f2e9a

Please sign in to comment.