stefnotch / aftermath-editor

A WYSIWYG mathematics editor that understands your formulas!
https://stefnotch.github.io/aftermath-editor
MIT License
14 stars 0 forks source link

Brackets #6

Closed stefnotch closed 1 year ago

stefnotch commented 1 year ago
// Brackets question: sub-tree or nah? (includes |abs|)
// if subtree: brackets stop being symbols, instead you can place the caret outside of the brackets and then there is another expression (usually row) inside them
// if not subtree: we need to find the ending bracket. which means that in the case of |abs|, we need to wrap it in its own row. and when |abs| gets deleted or edited, we gotta get rid of the useless row
stefnotch commented 1 year ago

Answer: Brackets are a special type of symbol.

They get handled like all symbols, however the parsing step ends up being rather different, because it attempts to find closing brackets.