1
0
mirror of synced 2025-12-20 02:19:14 -05:00

Auto-convert tables to first col header (#35533)

This commit is contained in:
Peter Bengtsson
2023-03-17 08:53:12 -04:00
committed by GitHub
parent a6cdcfd3a7
commit 4c220747ec
7 changed files with 95 additions and 4 deletions

View File

@@ -44,6 +44,12 @@ export default function createProcessor(context) {
})
.use(raw)
.use(wrapInElement, { selector: 'ol > li img', wrapper: 'span.procedural-image-wrapper' })
.use(wrapInElement, {
selector: '.rowheaders tbody tr td:first-child',
wrapper: 'th',
// This moves what it finds in the selector inside the wrapper.
rewrite: true,
})
.use(rewriteImgSources)
.use(rewriteAssetImgTags)
.use(rewriteLocalLinks, context)