Set correct scope attributes on rowheaders tables (#35999)
Co-authored-by: Rachael Sewell <rachmari@github.com>
This commit is contained in:
@@ -9,6 +9,7 @@ export default (options) => {
|
||||
const selector = options.selector || options.select || 'body'
|
||||
const wrapper = options.wrapper || options.wrap
|
||||
const rewrite = options.rewrite
|
||||
const additionalAttributes = options.wrapperAdditionalAttributes
|
||||
|
||||
/*
|
||||
* Transformer
|
||||
@@ -25,6 +26,13 @@ export default (options) => {
|
||||
for (const match of selectAll(selector, tree)) {
|
||||
visit(tree, match, (node, i, parent) => {
|
||||
const parsedWrapper = parseSelector(wrapper)
|
||||
if (additionalAttributes) {
|
||||
parsedWrapper.properties = Object.assign(
|
||||
{},
|
||||
parsedWrapper.properties || {},
|
||||
additionalAttributes
|
||||
)
|
||||
}
|
||||
if (rewrite) {
|
||||
parsedWrapper.children = node.children
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user