Skip to content

Commit b6d9d6d

Browse files
add exception for sections in findNoticeSpot
1 parent e7d76c0 commit b6d9d6d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/modules/ante/models/CTEParsoidDocument.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,11 @@ export default class CTEParsoidDocument extends ParsoidDocument {
213213

214214
for ( const spot of possibleSpots ) {
215215
if ( spot[ 1 ] != null ) {
216-
if ( spot[ 1 ].hasAttribute( 'data-mw' ) ) {
216+
if (
217+
spot[ 1 ].hasAttribute( 'data-mw' ) ||
218+
// Special condition for sections (which don't have `about` attributes).
219+
spot[ 1 ].nodeName === 'SECTION'
220+
) {
217221
return spot;
218222
} else {
219223
const identifier = (

0 commit comments

Comments
 (0)