diff --git a/src/commands/math/basicSymbols.ts b/src/commands/math/basicSymbols.ts index 12e0698dd..c073abd34 100644 --- a/src/commands/math/basicSymbols.ts +++ b/src/commands/math/basicSymbols.ts @@ -865,7 +865,12 @@ LatexCmds['.'] = () => '.' ); -LatexCmds["'"] = LatexCmds.prime = bindVanillaSymbol("'", '′', 'prime'); +LatexCmds['\u2018'] = + LatexCmds['\u2019'] = + LatexCmds['\u02BC'] = + LatexCmds["'"] = + LatexCmds.prime = + bindVanillaSymbol("'", '′', 'prime'); LatexCmds['″'] = LatexCmds.dprime = bindVanillaSymbol( '″', '″', diff --git a/test/unit/typing.test.js b/test/unit/typing.test.js index 52687a5b3..e697ee2e9 100644 --- a/test/unit/typing.test.js +++ b/test/unit/typing.test.js @@ -109,6 +109,15 @@ suite('typing with auto-replaces', function () { }); }); + suite('EquivalentQuote', function () { + test('different quote symbols', function () { + //these 4 are all different characters (!!) + mq.typedText("\u2018\u2019\u02BC'"); + //these 4 are all the same character + assertLatex("''''"); + }); + }); + suite('LatexCommandInput', function () { test('basic', function () { mq.typedText('\\sqrt-x');