1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-01-02 12:47:41 +02:00

Mobile : Fixes #8517: Fixed code block not default line wrap in pdf view (#8626)

This commit is contained in:
wljince007 2023-08-27 22:32:04 +08:00 committed by GitHub
parent f74732a03d
commit 591324b7bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 =
`
@ -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>