Source File
array_rows.go
Belonging Package
github.com/d2lang/mathjax-go/internal/tex
// Copyright (c) 2009-2022 The MathJax Consortium// SPDX-License-Identifier: Apache-2.0// Source: ts/input/tex/base/BaseItems.ts ArrayItem.EndRow/EndTable.package teximport// An explicit row separator always closes the pending entry, even if it is// empty. EndTable closes it only when nodes or previously closed entries// remain. Each mtd owns an inferred content row: an empty explicit group,// style, or leaf mspace is still an emitted node and must not be discarded.func omitFinalArrayRow(, int, []*mml.Node) bool {return == -1 && emptyArrayCells()}func emptyArrayCells( []*mml.Node) bool {if len() != 1 {return len() == 0}for , := range [0].Children {if .Kind != "mrow" || !.Flags.Inferred || len(.Children) != 0 {return false}}return true}
![]() |
The pages are generated with Golds v0.8.7. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |