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:
Ron Kok
2021-01-11 10:00:03 -08:00
committed by GitHub
parent 05eaadc050
commit 84981da3bf
3 changed files with 20 additions and 25 deletions

View File

@@ -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.`);
}
};