mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-16 00:08:39 +00:00
fix: Remove topEnv parameter. (#2712)
* fix: Remove topEnv parameter. * Set test to default strictness Co-authored-by: Kevin Barabash <kevinb@khanacademy.org>
This commit is contained in:
@@ -49,10 +49,8 @@ function getHLines(parser: Parser): boolean[] {
|
||||
const validateAmsEnvironmentContext = context => {
|
||||
const settings = context.parser.settings;
|
||||
if (!settings.displayMode) {
|
||||
throw new ParseError(`{${context.envName}} cannot be used inline.`);
|
||||
} else if (settings.strict && !settings.topEnv) {
|
||||
settings.reportNonstrict("textEnv",
|
||||
`{${context.envName}} called from math mode.`);
|
||||
throw new ParseError(`{${context.envName}} can be used only in` +
|
||||
` display mode.`);
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user