Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions packages/docs-builder/src/gen-html.ts
Original file line number Diff line number Diff line change
Expand Up @@ -586,19 +586,7 @@ export function convertMarkdownToHtml(context: Context, md: string): string {

// Wrap tables in a div to allow for responsive scrolling behavior
table: (header, body) => {
const mdRelPath = context.getCurrentPage()
let classes = 'table-container'
if (mdRelPath.includes('tech_removal')) {
// XXX: Include a special class for the "CDR Methods" table on the Tech CDR page
// in the En-ROADS User Guide so that we can target it in CSS. Currently we
// check the number of rows to differentiate it from the other slider settings
// table on that page.
const rowTags = [...body.matchAll(/<tr>/g)]
if (rowTags.length > 1) {
classes += ' removal_methods'
}
}
return `<div class="${classes}"><table><thead>${header}</thead><tbody>${body}</tbody></table></div>`
return `<div class="table-container"><table><thead>${header}</thead><tbody>${body}</tbody></table></div>`
}
}
})
Expand Down