Source File
final_item.go
Belonging Package
github.com/d2lang/mathjax-go/internal/tex
// Copyright 2017-2022 The MathJax Consortium// SPDX-License-Identifier: Apache-2.0// Based on Stack.Push, PhysicsMethods.AutoClose and BaseItems.PositionItem.package teximport// autoclose belongs to the source MmlItem, not its MML node. A recipient may// replay the same item after changing its node, or replace it with a new item.type finalItem struct {node *mml.Nodeautoclose byte}func finalItems( []*mml.Node) []finalItem {:= make([]finalItem, 0, len())for , := range {if != nil {= append(, finalItem{node: })}}return}func ( *positionItem) ( finalItem) []finalItem {if .left != nil {// Horizontal Position replays the identical incoming MmlItem.return []finalItem{{node: .left}, , {node: .right}}}// Vertical Position creates a new item around mpadded; no item properties// are copied from the consumed incoming item.return finalItems(.apply(.node))}
![]() |
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. |