Repository: Khan/KaTeX
Pull request #1389 (2018-05-31 20:44:43)

Support Unicode ≲ ⩽ ⪅ ≶ ⋚ ⪋
Add six more Unicode relation characters to `symbols.js`.

Fixes issue #1384.

codecov[bot]: # [Codecov](https://codecov.io/gh/Khan/KaTeX/pull/1389?src=pr&el=h1) Report
> Merging [#1389](https://codecov.io/gh/Khan/KaTeX/pull/1389?src=pr&el=desc) into [master](https://codecov.io/gh/Khan/KaTeX/commit/9d40d662b3c6864c19cbccdcfa6c497cc83c5427?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `100%`.


[![Impacted file tree graph](https://codecov.io/gh/Khan/KaTeX/pull/1389/graphs/tree.svg?token=vfDnj2P77o&src=pr&height=150&width=650)](https://codecov.io/gh/Khan/KaTeX/pull/1389?src=pr&el=tree)

```diff
@@           Coverage Diff           @@
##           master    #1389   +/-   ##
=======================================
  Coverage   82.34%   82.34%           
=======================================
  Files          77       77           
  Lines        4242     4242           
  Branches      731      731           
=======================================
  Hits         3493     3493           
  Misses        647      647           
  Partials      102      102
```


| [Impacted Files](https://codecov.io/gh/Khan/KaTeX/pull/1389?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [src/symbols.js](https://codecov.io/gh/Khan/KaTeX/pull/1389/diff?src=pr&el=tree#diff-c3JjL3N5bWJvbHMuanM=) | `100% <100%> (ø)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/Khan/KaTeX/pull/1389?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/Khan/KaTeX/pull/1389?src=pr&el=footer). Last update [9d40d66...a70075b](https://codecov.io/gh/Khan/KaTeX/pull/1389?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


Patch:
diff --git a/src/symbols.js b/src/symbols.js
index 50ffeed2..754ddb63 100644
--- a/src/symbols.js
+++ b/src/symbols.js
@@ -301,16 +301,16 @@ defineSymbol(math, ams, close, "\u2518", "\\lrcorner", true);
 
 // AMS Binary Relations
 defineSymbol(math, ams, rel, "\u2266", "\\leqq", true);
-defineSymbol(math, ams, rel, "\u2a7d", "\\leqslant");
+defineSymbol(math, ams, rel, "\u2a7d", "\\leqslant", true);
 defineSymbol(math, ams, rel, "\u2a95", "\\eqslantless", true);
-defineSymbol(math, ams, rel, "\u2272", "\\lesssim");
-defineSymbol(math, ams, rel, "\u2a85", "\\lessapprox");
+defineSymbol(math, ams, rel, "\u2272", "\\lesssim", true);
+defineSymbol(math, ams, rel, "\u2a85", "\\lessapprox", true);
 defineSymbol(math, ams, rel, "\u224a", "\\approxeq", true);
 defineSymbol(math, ams, bin, "\u22d6", "\\lessdot");
 defineSymbol(math, ams, rel, "\u22d8", "\\lll", true);
-defineSymbol(math, ams, rel, "\u2276", "\\lessgtr");
-defineSymbol(math, ams, rel, "\u22da", "\\lesseqgtr");
-defineSymbol(math, ams, rel, "\u2a8b", "\\lesseqqgtr");
+defineSymbol(math, ams, rel, "\u2276", "\\lessgtr", true);
+defineSymbol(math, ams, rel, "\u22da", "\\lesseqgtr", true);
+defineSymbol(math, ams, rel, "\u2a8b", "\\lesseqqgtr", true);
 defineSymbol(math, ams, rel, "\u2251", "\\doteqdot");
 defineSymbol(math, ams, rel, "\u2253", "\\risingdotseq", true);
 defineSymbol(math, ams, rel, "\u2252", "\\fallingdotseq", true);


Test patch:
diff --git a/test/katex-spec.js b/test/katex-spec.js
index c53e23b9..b1ca1c41 100644
--- a/test/katex-spec.js
+++ b/test/katex-spec.js
@@ -2889,7 +2889,7 @@ describe("Unicode", function() {
     });
 
     it("should build more relations", function() {
-        expect("⊂⊃⊆⊇⊏⊐⊑⊒⊢⊣⊩⊪⊸⋈⋍⋐⋑⋔⋛⋞⋟⌢⌣⩾⪆⪌⪕⪖⪯⪰⪷⪸⫅⫆≘≙≚≛≝≞≟").toBuild(strictSettings);
+        expect("⊂⊃⊆⊇⊏⊐⊑⊒⊢⊣⊩⊪⊸⋈⋍⋐⋑⋔⋛⋞⋟⌢⌣⩾⪆⪌⪕⪖⪯⪰⪷⪸⫅⫆≘≙≚≛≝≞≟≲⩽⪅≶⋚⪋").toBuild(strictSettings);
     });
 
     it("should parse symbols", function() {