🐛(frontend) fix export when quote block and inline code
When exporting documents, if a inline code was inside a quote block, the PDF export was failing because the inline code was searching the GeistMono font in italics, which was not available. We switch to the core "Courier" font for code marks, which is available in italics.
This commit is contained in:
@@ -31,6 +31,7 @@ and this project adheres to
|
||||
|
||||
- 🐛(makefile) Windows compatibility fix for Docker volume mounting #1264
|
||||
- 🐛(minio) fix user permission error with Minio and Windows #1264
|
||||
- 🐛(frontend) fix export when quote block and inline code #1319
|
||||
|
||||
## [3.5.0] - 2025-07-31
|
||||
|
||||
|
||||
@@ -24,4 +24,16 @@ export const docxDocsSchemaMappings: DocsExporterDocx['mappings'] = {
|
||||
interlinkingSearchInline: () => new Paragraph(''),
|
||||
interlinkingLinkInline: inlineContentMappingInterlinkingLinkDocx,
|
||||
},
|
||||
styleMapping: {
|
||||
...docxDefaultSchemaMappings.styleMapping,
|
||||
// Switch to core PDF "Courier" font to avoid relying on GeistMono
|
||||
// that is not available in italics
|
||||
code: (enabled?: boolean) =>
|
||||
enabled
|
||||
? {
|
||||
font: 'Courier New',
|
||||
shading: { fill: 'DCDCDC' },
|
||||
}
|
||||
: {},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -29,4 +29,11 @@ export const pdfDocsSchemaMappings: DocsExporterPDF['mappings'] = {
|
||||
interlinkingSearchInline: () => <></>,
|
||||
interlinkingLinkInline: inlineContentMappingInterlinkingLinkPDF,
|
||||
},
|
||||
styleMapping: {
|
||||
...pdfDefaultSchemaMappings.styleMapping,
|
||||
// Switch to core PDF "Courier" font to avoid relying on GeistMono
|
||||
// that is not available in italics
|
||||
code: (enabled?: boolean) =>
|
||||
enabled ? { fontFamily: 'Courier', backgroundColor: '#dcdcdc' } : {},
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user