mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-07 04:08:43 +00:00
docs: Fix \bar documentation by avoiding global redefinition (#3804)
* `\bar` examples weren't rendering correctly because of `\gdef\bar` example when illustrating `\gdef` and `\xdef`. * Improve `\bar` name to `\sqr` when defining squaring (not necessary for fix, but improved naming). * Fix `\def` scoping test that originally seemed related. Fixes #3803
This commit is contained in:
@@ -3471,7 +3471,7 @@ describe("A macro expander", function() {
|
||||
|
||||
it("\\def changes settings.macros with globalGroup", () => {
|
||||
const macros = {};
|
||||
expect`\gdef\foo{1}`.toParse(new Settings({macros, globalGroup: true}));
|
||||
expect`\def\foo{1}`.toParse(new Settings({macros, globalGroup: true}));
|
||||
expect(macros["\\foo"]).toBeTruthy();
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user