Skip to content

Commit

Permalink
chore: Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
shellscape authored Dec 8, 2024
1 parent 4515add commit adb2534
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/jsx-email/src/components/raw.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ declare global {
}
}

export interface RawOutputProps {
export interface RawProps {
content: string;
disableOutputToPlainText?: boolean;
}
Expand Down
4 changes: 2 additions & 2 deletions packages/jsx-email/src/renderer/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const renderPlainText = async (
const result = await jsxToString(component);
return htmlToText(result, {
formatters: {
rawOutput: (elem, _walk, builder) => {
raw: (elem, _walk, builder) => {
if (elem.children.length && elem.children[0].type === 'comment') {
builder.addInline(unescapeForRawComponent(elem.children[0].data!.trim()));
}
Expand All @@ -32,7 +32,7 @@ export const renderPlainText = async (
{ format: 'skip', selector: '[data-skip="true"]' },
{ options: { linkBrackets: false }, selector: 'a' },
{
format: 'rawOutput',
format: 'raw',
options: {},
selector: 'jsx-email-raw'
},
Expand Down

0 comments on commit adb2534

Please sign in to comment.