2323
2424import { AbstractWrapper } from '../../core/Tree/Wrapper.js' ;
2525import { Node , PropertyList } from '../../core/Tree/Node.js' ;
26- import { MmlNode , TextNode , AbstractMmlNode , AttributeList } from '../../core/MmlTree/MmlNode.js' ;
26+ import { MmlNode , TextNode , AbstractMmlNode , AttributeList , indentAttributes } from '../../core/MmlTree/MmlNode.js' ;
2727import { Property } from '../../core/Tree/Node.js' ;
2828import { OptionList } from '../../util/Options.js' ;
2929import { unicodeChars } from '../../util/string.js' ;
@@ -279,7 +279,7 @@ export class CHTMLWrapper<N, T, D> extends AbstractWrapper<MmlNode, CHTMLWrapper
279279 this . childNodes = node . childNodes . map ( ( child : Node ) => {
280280 const wrapped = this . wrap ( child as MmlNode ) ;
281281 if ( wrapped . bbox . pwidth ) {
282- this . bbox . pwidth = '100%' ;
282+ this . bbox . pwidth = BBox . fullWidth ;
283283 }
284284 return wrapped ;
285285 } ) ;
@@ -622,7 +622,7 @@ export class CHTMLWrapper<N, T, D> extends AbstractWrapper<MmlNode, CHTMLWrapper
622622 */
623623 protected handlePWidth ( ) {
624624 if ( this . bbox . pwidth ) {
625- if ( this . bbox . pwidth === '100%' ) {
625+ if ( this . bbox . pwidth === BBox . fullWidth ) {
626626 this . adaptor . setAttribute ( this . chtml , 'width' , 'full' ) ;
627627 } else {
628628 this . adaptor . setStyle ( this . chtml , 'width' , this . bbox . pwidth ) ;
@@ -683,8 +683,7 @@ export class CHTMLWrapper<N, T, D> extends AbstractWrapper<MmlNode, CHTMLWrapper
683683 */
684684 protected getAlignShift ( ) {
685685 let { indentalign, indentshift, indentalignfirst, indentshiftfirst} =
686- this . node . attributes . getList ( 'indentalign' , 'indentshift' ,
687- 'indentalignfirst' , 'indentshiftfirst' ) as StringMap ;
686+ this . node . attributes . getList ( ...indentAttributes ) as StringMap ;
688687 if ( indentalignfirst !== 'indentalign' ) {
689688 indentalign = indentalignfirst ;
690689 }
@@ -702,7 +701,7 @@ export class CHTMLWrapper<N, T, D> extends AbstractWrapper<MmlNode, CHTMLWrapper
702701 }
703702
704703 /*
705- * @param {N } chtml The HTML node whose indenting is to be adjusted
704+ * @param {N } chtml The HTML node whose indentation is to be adjusted
706705 * @param {string } align The alignment for the node
707706 * @param {number } shift The indent (positive or negative) for the node
708707 */
0 commit comments