Source File
spread_pop.go
Belonging Package
github.com/d2lang/mathjax-go/internal/tex
// Copyright (c) 2021-2022 The MathJax Consortium// SPDX-License-Identifier: Apache-2.0// Sources: MathtoolsMethods.SpreadLines and MathtoolsUtil.spreadLines.package teximport ()// Pop.toMml is selected before the result is pushed into any outer prefix.// Only a direct mtable or immediate inferred-row children receive spacing.// A nil spread denotes the absent property on a popped non-Begin stack item.func mathtoolsSpreadPop( *mml.Node, *string) error {for , := range unwrapInferred() {if .Kind != "mtable" {continue}, := .Attributes.Get("rowspacing")if !limitsTruthy() {// The source assigns undefined on this branch without calling// dimen2em. An explicit nil retains the absent effective value.var anyif != nil {= *}.Attributes.Set("rowspacing", )continue}if == nil {// dimen2em(undefined) throws at this first Pop, before any// subsequent token or closing-item reduction can run.return fmt.Errorf("spreadlines popped a table without a spread dimension")}mathtoolsAddRowSpacing(, *)}return nil}func mathtoolsSpreadPending( []*mml.Node) error {return mathtoolsSpreadPop(row(, true), nil)}
![]() |
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. |