mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-18 01:08:40 +00:00
feat(function): add allowedInArgument
instead of greediness
property (#2134)
* Remove `greediness` property Use boolean `grouped` property instead, which is more consistent with LaTeX. BREAKING CHANGE: \cfrac, \color, \textcolor, \colorbox, \fcolorbox are no longer grouped. * Rename grouped to allowedInArgument * Reenable tests * Update documentation * Fix typo Co-authored-by: Kevin Barabash <kevinb@khanacademy.org>
This commit is contained in:
@@ -52,7 +52,6 @@ export type EnvSpec<NODETYPE: NodeType> = {|
|
||||
type: NODETYPE, // Need to use the type to avoid error. See NOTES below.
|
||||
numArgs: number,
|
||||
argTypes?: ArgType[],
|
||||
greediness: number,
|
||||
allowedInText: boolean,
|
||||
numOptionalArgs: number,
|
||||
handler: EnvHandler,
|
||||
@@ -99,7 +98,6 @@ export default function defineEnvironment<NODETYPE: NodeType>({
|
||||
const data = {
|
||||
type,
|
||||
numArgs: props.numArgs || 0,
|
||||
greediness: 1,
|
||||
allowedInText: false,
|
||||
numOptionalArgs: 0,
|
||||
handler,
|
||||
|
Reference in New Issue
Block a user