Skip to content

Commit

Permalink
Mobile : Fixes #8517: Fixed code block not default line wrap in pdf v…
Browse files Browse the repository at this point in the history
…iew (#8626)
  • Loading branch information
wljince007 authored Aug 27, 2023
1 parent f74732a commit 591324b
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,12 @@ export default function useSource(noteBody: string, noteMarkupLanguage: number,
padding: 0;
}
`;
const defaultCss = `
code {
white-space: pre-wrap;
overflow-x: hidden;
}
`;

html =
`
Expand All @@ -203,7 +209,7 @@ export default function useSource(noteBody: string, noteMarkupLanguage: number,
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
${shim.mobilePlatform() === 'ios' ? iOSSpecificCss : ''}
${shim.mobilePlatform() === 'ios' ? `${iOSSpecificCss}\n${defaultCss}` : defaultCss}
</style>
${assetsToHeaders(result.pluginAssets, { asHtml: true })}
</head>
Expand Down

0 comments on commit 591324b

Please sign in to comment.