www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 8c179252c576ad571c9e5e0fa2a2aac0b9e7cc5d
parent fe346f56ca934487bf4bc4556b0668ab21c65974
Author: Alex Lopatin <alex@khanacademy.org>
Date:   Tue, 28 Jan 2014 16:13:51 -0800

Added \cong + fixed comment copypasta.

Test Plan: Parses and renders locally.

Reviewers: alpert

Reviewed By: alpert

Differential Revision: http://phabricator.khanacademy.org/D6393

Diffstat:
MParser.js | 3++-
MbuildTree.js | 1+
Mtest/katex-tests.js | 2+-
3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/Parser.js b/Parser.js @@ -271,6 +271,7 @@ var copyFuncs = { "rel": [ "rel", "\\approx", + "\\cong", "\\ge", "\\geq", "\\gets", @@ -360,7 +361,7 @@ Parser.prototype.parseNucleus = function(pos) { "Expected group after '" + nucleus.text + "'"); } } else if (utils.contains(sizeFuncs, nucleus.type)) { - // If this is a color function, parse its argument and return + // If this is a size function, parse its argument and return var group = this.parseGroup(nucleus.position); if (group) { return new ParseResult( diff --git a/buildTree.js b/buildTree.js @@ -423,6 +423,7 @@ var charLookup = { "\\cdot": "\u22c5", "\\circ": "\u2218", "\\colon": ":", + "\\cong": "\u2245", "\\div": "\u00f7", "\\ge": "\u2265", "\\geq": "\u2265", diff --git a/test/katex-tests.js b/test/katex-tests.js @@ -63,7 +63,7 @@ describe("A bin parser", function() { }); describe("A rel parser", function() { - var expression = "=<>\\leq\\geq\\neq\\nleq\\ngeq"; + var expression = "=<>\\leq\\geq\\neq\\nleq\\ngeq\\cong"; it("should not fail", function() { expect(function() {