Comments
mjbvz
removed
help wanted
Issues identified as good community contribution opportunities
good first issue
Issues identified as good for first-time contributors
labels
Dec 9, 2022
mjbvz
added a commit
to mjbvz/vscode
that referenced
this issue
Dec 9, 2022
mjbvz
added a commit
that referenced
this issue
Dec 9, 2022
EngineLessCC
added a commit
to EngineLessCC/vscode
that referenced
this issue
Dec 11, 2022
commit f63eaa61fb7e4599824574add2e29ae5e677cf77 Author: SteVen Batten <6561887+sbatten@users.noreply.github.com> Date: Sat Dec 10 08:41:45 2022 -0800 remove font-face from shadow dom css (#168682) fixes #159877 commit d1f42f4857c638aa1580f0ea6d0855618f7d47ad Author: SteVen Batten <6561887+sbatten@users.noreply.github.com> Date: Fri Dec 9 16:50:06 2022 -0800 remove unused exports/dropdown (#168681) commit a9e4a0f0edc101e1c0be8fc61c278ed35bdd68fd Author: Matt Bierner <matb@microsoft.com> Date: Fri Dec 9 15:26:06 2022 -0800 Pick up latest markdown-it katex (#168673) Fixes #138970 commit 82a00605474987a1b6f5208018d523fa3b2d356a Author: Megan Rogge <merogge@microsoft.com> Date: Fri Dec 9 17:22:47 2022 -0600 allow tasks to be in the editor area, respect `waitOnExit` (#168341) commit 4f1190b1d70b8a48dc64788a696722c90542520a Author: Megan Rogge <merogge@microsoft.com> Date: Fri Dec 9 17:20:10 2022 -0600 update find result on option change (#168672) fix #151181 commit 5bd2e5635fc6173968f2d98509bff53105419b1f Author: Megan Rogge <merogge@microsoft.com> Date: Fri Dec 9 15:56:13 2022 -0600 fix no registered selector for terminal quick fix ID (#168648) commit f14aee2e25c20e54e789c5e2f9089bc0230bc5aa Merge: 7daf0fe9316 a156b180377 Author: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Fri Dec 9 13:50:32 2022 -0800 Merge pull request #168631 from microsoft/tyriar/159255 Send cwd shell integration sequence for tasks commit 7daf0fe9316b218ba15ed1cf6bbb7733ce33c3c0 Author: Peng Lyu <penn.lv@gmail.com> Date: Fri Dec 9 13:15:27 2022 -0800 fix #138299. Hide suggest widget when input box moves (#168663) commit 42dc9ccd043e2521c459b827852c534a40202c9a Author: Babak K. Shandiz <babak.k.shandiz@gmail.com> Date: Sat Dec 10 00:37:05 2022 +0330 🐛 Fix incorrect JSON schema for `fileLocation` property (#168659) Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com> commit edd764b6dc4592449b988ef9779b99ffdc50dade Author: Tyler James Leonhardt <me@tylerleonhardt.com> Date: Fri Dec 9 12:08:27 2022 -0800 Revert "Do not select full contents of inputbox before selecting a range, fixes #167266. (#167274)" (#168657) This reverts commit 4b148a70a835dd1f3ed1d36710ec5192a38fc532. commit 3c5db04316806d956258285a2dd7631fdbc56d18 Author: Matt Bierner <matb@microsoft.com> Date: Fri Dec 9 11:45:48 2022 -0800 Use proper function to get image dirname (#168652) Fixes #168608 commit 67c997d6a65a3c857e9e2e589d3b4adf5ee1ff34 Author: Logan Ramos <lramos15@gmail.com> Date: Fri Dec 9 14:44:56 2022 -0500 Fix 415 during telemetry health check (#168650) commit 09b5220d78ed381fa02ca56b1fd4dbd5777a7e7a Author: Matt Bierner <matb@microsoft.com> Date: Fri Dec 9 11:31:52 2022 -0800 Fix aria-flowto not being set (#168541) For #166768 However this doesn't actually fix the issue in my testing commit d97a30c7019a50035399e2cf4a187d89e493c704 Author: Ladislau Szomoru <3372902+lszomoru@users.noreply.github.com> Date: Fri Dec 9 20:23:35 2022 +0100 Git - Improve unsafe repository handling (#168568) Improve unsafe repository handling by extracting the repository path to be used when calling git config commit 7e49103c7c530f7fd4e4c3a4649721f4d0e2561e Author: Connor Peet <connor@peet.io> Date: Fri Dec 9 11:12:04 2022 -0800 remote: allow _ in ext host resolvedauthority (#168649) Fixes https://github.com/microsoft/vscode-remote-release/issues/7661 This character was allowed in https://github.com/microsoft/vscode/pull/167635, but the extension host side did a separate check that I didn't update. commit 08edf978851ef0d4927aafe24ea80952480ec16f Merge: 3b4603e652b 695c1e222ec Author: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Fri Dec 9 10:52:38 2022 -0800 Merge pull request #168646 from microsoft/tyriar/168640 Fix Windows absolute link searching commit 3b4603e652be27cf262c5d172853472d6d04faeb Merge: d851f455497 49277f739c8 Author: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Fri Dec 9 10:52:26 2022 -0800 Merge pull request #168610 from microsoft/tyriar/156288 Improve removal of link suffix commit 695c1e222ec277c26a5005ea544f194e6ac18fc2 Author: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Fri Dec 9 10:20:42 2022 -0800 Fix Windows absolute link searching Fixes #168640 commit d851f455497dc335c07e0607cd0c604dc72dd8ba Merge: c2bb0cdb01f ce6c14488d5 Author: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Fri Dec 9 09:54:48 2022 -0800 Merge pull request #168614 from microsoft/tyriar/156679 Improve enableFileLinks behavior commit c2bb0cdb01fd7c52c62ae30da7a3f11ff6b1e8d7 Author: Matt Bierner <matb@microsoft.com> Date: Fri Dec 9 09:27:27 2022 -0800 Add AriaRole type to help select valid aria roles (#168538) This add a new `AriaRole` type for all valid aria roles. This means you get intellisense for these when trying to fill in an AriaRole commit ad683c8c12e2d17fec6e74488ae0c2ad9689f531 Author: Megan Rogge <merogge@microsoft.com> Date: Fri Dec 9 11:19:39 2022 -0600 fix `HISTFILE` issue (#168482) commit 12d5f2be75357ed6f65afec60f4f68c8b4cad9fe Author: Johannes Rieken <johannes.rieken@gmail.com> Date: Fri Dec 9 18:15:31 2022 +0100 fix https://github.com/microsoft/vscode/issues/168037 (#168632) commit bbc787b50a533d87cef7fdcc4c9dbabfab3e2409 Merge: b435380bb54 7bed5673d1a Author: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Fri Dec 9 09:14:18 2022 -0800 Merge pull request #168627 from microsoft/tyriar/168626 Don't output sequence data if it's undefined commit b435380bb54846244e541a3ed9dcd0c01ebcf542 Merge: 4e0c3ed84b4 cd0c22ae751 Author: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Fri Dec 9 09:14:07 2022 -0800 Merge pull request #168611 from microsoft/tyriar/156390 Support dnd into terminal editor commit 4e0c3ed84b48e49816fe0755c47c38c051900308 Merge: c2792a202f4 f311a97fe13 Author: Aaron Munger <aamunger@microsoft.com> Date: Fri Dec 9 09:11:39 2022 -0800 Merge pull request #168528 from amunger/colossal-hoverfly disable cell drag and drop for IW commit a156b180377d8ecb0f10f90dab9952886ac139ed Author: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Fri Dec 9 08:55:06 2022 -0800 Send cwd shell integration sequence for tasks This enables links to be resolved with knowledge of the cwd, the downside here is if the task changes the directory via cd it will no longer be accurate unless shell integration is manually installed and activated. Fixes #159255 commit c2792a202f411e6bcfca2399bce4b9b0dbdaf63e Author: Ladislau Szomoru <3372902+lszomoru@users.noreply.github.com> Date: Fri Dec 9 17:50:55 2022 +0100 SCM - fix placeholder position (#168628) commit 7bed5673d1ab27fc504a675580d4de9bcb7df0e7 Author: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Fri Dec 9 08:34:21 2022 -0800 Don't output sequence data if it's undefined Fixes #168626 commit 4c4278307fd4766e8ac8acb899b77d74b3252b7e Author: Megan Rogge <merogge@microsoft.com> Date: Fri Dec 9 10:17:19 2022 -0600 when a task terminates, remove it from the `_inProgressTasks` (#168521) commit a56403cb2868fb03a8164d74cbb09a1ca4efd0c7 Merge: be0b619bbfe f124fc92a3e Author: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Fri Dec 9 08:04:14 2022 -0800 Merge pull request #168619 from microsoft/tyriar/158807 Treat links that start with ~ as absolute commit be0b619bbfe0188bf20d288b0f96ea634bd81e9a Author: Alexandru Dima <alexdima@microsoft.com> Date: Fri Dec 9 16:54:05 2022 +0100 Add workaround for DEL appearing during IME input (#168617) Fixes #165982: Add workaround for DEL appearing during IME input commit f124fc92a3e8e4369dedb653d5681abc25ef5ced Author: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Fri Dec 9 07:49:09 2022 -0800 Treat links that start with ~ as absolute Fixes #158807 commit e4095d3a6e898b4fd35322e0218e6b902c1e6fb0 Author: João Moreno <joao.moreno@microsoft.com> Date: Fri Dec 9 16:48:20 2022 +0100 show "show release notes" checkbox (#168616) fixes #110507 commit 83fc6741c606fefa3b027a9474f5e2686d3a0790 Author: Johannes Rieken <johannes.rieken@gmail.com> Date: Fri Dec 9 16:43:10 2022 +0100 remove extra margin of 1px to align sticky scroll (#168615) fixes https://github.com/microsoft/vscode/issues/165698 commit 06a8378a662d6a6fe86a2c69d6078df6dd3ebb9b Author: Alexandru Dima <alexdima@microsoft.com> Date: Fri Dec 9 16:35:19 2022 +0100 Compute the distance to the edges of the minimap (#168613) Fixes #168419: Compute the distance to the edges of the minimap commit ce6c14488d5b810a9b2ceb20acf903f2aabc94c7 Author: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Fri Dec 9 07:25:05 2022 -0800 Add trialing break commit bcd9cab9c252b67f0386f761041e0cacfc71f476 Author: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Fri Dec 9 07:24:29 2022 -0800 Improve enableFileLinks behavior Fixes #156679 commit b835904d5aaa3ccc8c75137f91887ba3e185aecc Author: Johannes Rieken <johannes.rieken@gmail.com> Date: Fri Dec 9 16:14:04 2022 +0100 fix https://github.com/microsoft/vscode/issues/161949 (#168609) commit cd0c22ae7512066c84756312f20671e0adbe5e11 Author: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Fri Dec 9 07:10:16 2022 -0800 Support dnd into terminal editor Fixes #156390 commit 7aee64835fb7aeef89770bfd3cafdaeab4e37c12 Merge: 4416bf850f1 e666f1f7780 Author: Alexandru Dima <alexdima@microsoft.com> Date: Fri Dec 9 16:06:41 2022 +0100 Merge pull request #168607 from microsoft/alexd/great-toad Add `keyboard.mapAltGrToCtrlAlt` which will treat `AltGraph+` as `Ctrl+Alt+` commit 4416bf850f1603216e2fb4b6d6e32798cd328a5d Author: João Moreno <joao.moreno@microsoft.com> Date: Fri Dec 9 16:05:34 2022 +0100 update paged list loading icons (#168604) fixes #154906 commit 49277f739c8c788254000d90b7d3a783a90a1507 Author: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Fri Dec 9 07:04:53 2022 -0800 Fix file name ref commit c16de20f03531c75b2795874e6f82352a8753742 Author: Martin Aeschlimann <martinae@microsoft.com> Date: Fri Dec 9 16:03:30 2022 +0100 fix inconsistent usages of selectForeground (#168606) commit f5fd88abba0996f37060eb69fc3e3731b976362c Author: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Fri Dec 9 07:03:11 2022 -0800 Improve removal of link suffix Fixes #156288 commit 419d0264310f30ac48c53d6e0325aefab1b85a33 Author: Alex Ross <alros@microsoft.com> Date: Fri Dec 9 15:57:09 2022 +0100 Comment thread node so extension can use get/set body (#168605) commit e666f1f77805be48772cc05136a3cdac3e9eacc3 Author: Alexandru Dima <alexdima@microsoft.com> Date: Fri Dec 9 15:48:59 2022 +0100 Add `keyboard.mapAltGrToCtrlAlt` which will treat `AltGraph+` as `Ctrl+Alt+` commit fa181ccad5239cbf641a247694f7a6909b63e52f Author: Johannes Rieken <johannes.rieken@gmail.com> Date: Fri Dec 9 15:37:12 2022 +0100 implement `ICheckable` for category element (#168603) fixes https://github.com/microsoft/vscode/issues/167732 commit 378e2bbbc9b92a974b038dc2665538687358af6b Author: Christof Marti <chrmarti@microsoft.com> Date: Fri Dec 9 15:19:13 2022 +0100 Use replacer (#167239) commit 741f5b480a3ec00c956956d2c66f3e2d6221c893 Author: Henning Dieterichs <hdieterichs@microsoft.com> Date: Fri Dec 9 15:16:55 2022 +0100 Fixes flashing of inline conflict marker code lenses (#168598) commit f2ef1cce6e3afb1f766554f2f8802e79a35537bd Author: Johannes Rieken <johannes.rieken@gmail.com> Date: Fri Dec 9 15:06:40 2022 +0100 fix https://github.com/microsoft/vscode/issues/154048 (#168597) commit 9d01c6c5984c2be2d787f97eeca934ace38008a3 Author: João Moreno <joao.moreno@microsoft.com> Date: Fri Dec 9 15:05:09 2022 +0100 simplify linux icon names (#168596) fixes #157390 commit 4ccf2d729bbb47ad30be9dea6ccfadf4c11cfdab Author: Ladislau Szomoru <3372902+lszomoru@users.noreply.github.com> Date: Fri Dec 9 14:52:09 2022 +0100 Git - fix untracked group commands (#168593) commit d1efce62fd696450618f7d08679e7d5c73d3bc09 Author: Alexandru Dima <alexdima@microsoft.com> Date: Fri Dec 9 14:19:08 2022 +0100 Rename commit 996c93a739c4f405eda2c24c34157ae5be7b64e8 Author: Alexandru Dima <alexdima@microsoft.com> Date: Fri Dec 9 14:16:12 2022 +0100 Handle `keyboard.dispatch` in `IKeyboardLayoutService` commit 5597167c4c523e89ba114e364fe3314df6695b67 Author: Henning Dieterichs <hdieterichs@microsoft.com> Date: Fri Dec 9 14:06:55 2022 +0100 Fixes #79125 (#168588) commit 95d8fd7c142b7c2e8b53e225eb5ae7a56153fd24 Author: Henning Dieterichs <hdieterichs@microsoft.com> Date: Fri Dec 9 13:58:08 2022 +0100 Fixes #149922 (#168587) commit 859fedfb8b94a95b53cd11bd36cd764746baae2e Author: Alexandru Dima <alexdima@microsoft.com> Date: Fri Dec 9 13:55:30 2022 +0100 Add `IKeyboardEvent.altGraphKey` commit 1193b8ab3e67c569a77a13057427661b795de155 Author: Johannes Rieken <johannes.rieken@gmail.com> Date: Fri Dec 9 13:32:25 2022 +0100 fix https://github.com/microsoft/vscode/issues/165758 (#168577) commit a89b0e97a1a23de931694d7d87b3879c3b00fd1e Author: Johannes Rieken <johannes.rieken@gmail.com> Date: Fri Dec 9 13:31:54 2022 +0100 ensure (newly) selected item from references tree is visible in the editor (#168574) fixes https://github.com/microsoft/vscode/issues/167296#event-7989480633 commit 5d3452353b864fc1c861e29bd30ce12dac2b3078 Author: Johannes Rieken <johannes.rieken@gmail.com> Date: Fri Dec 9 13:31:05 2022 +0100 restore editor scroll state after applying edits (#168576) fixes https://github.com/microsoft/vscode/issues/160934 commit 059f680e752b9bdc23fe04e0e7760c6f6a1af86a Author: Johannes Rieken <johannes.rieken@gmail.com> Date: Fri Dec 9 13:30:12 2022 +0100 fix https://github.com/microsoft/vscode/issues/151888 (#168584) commit d4d44650b2390dc15a6bdd9ffb7a3eda749fe9c2 Author: Martin Aeschlimann <martinae@microsoft.com> Date: Fri Dec 9 12:29:37 2022 +0100 Theme picker: Restore the theme when install is cancelled (#168575) commit 376af084af1ef6ebf35cc1176dca84768aaf42d7 Author: Alexandru Dima <alexdima@microsoft.com> Date: Fri Dec 9 11:07:14 2022 +0100 Add separate colors for word highlight of type DocumentHighlightKind.Text (#168318) * Fixes #167766: Add separate colors for word highlight of type DocumentHighlightKind.Text * Address PR feedback commit 90812ba66f6e2fd0865152e6f2102d908695c9fb Author: João Moreno <joao.moreno@microsoft.com> Date: Fri Dec 9 10:45:01 2022 +0100 remove unused pipeline (#168567) commit 0f355c2d42023c4674223dc6c1f7c402bf7f6634 Author: Johannes Rieken <johannes.rieken@gmail.com> Date: Fri Dec 9 09:45:55 2022 +0100 set a fixed height for command center (#168566) fixes https://github.com/microsoft/vscode/issues/162881 commit f076d553210e9ea65e7bccbfa2f7a786c10fcab2 Author: Alexandru Dima <alexdima@microsoft.com> Date: Fri Dec 9 09:35:25 2022 +0100 update distro (#168561) commit a956778925ba793e1496d884c138e5f2d3f4b8c0 Author: Benjamin Pasero <benjamin.pasero@microsoft.com> Date: Fri Dec 9 08:27:08 2022 +0100 working copy - let "Save As" flow succeed even when revert fails (#168552) (#168555) commit 422b581e3802e30cfb780c21d9cc1a2cd0c9f0aa Author: Peng Lyu <penn.lv@gmail.com> Date: Thu Dec 8 17:50:55 2022 -0800 Bump distro, fix conflicts. (#168540) commit 8ff1d4832530f19e85212cd8b03ddaa8109fa4bb Author: Aaron Munger <aamunger@microsoft.com> Date: Thu Dec 8 16:21:12 2022 -0800 show delete cell toolbar button for IW (#168499) show delete cell for IW commit f311a97fe1339a7a666e8ed6f48d34df1e792e42 Author: aamunger <aamunger@microsoft.com> Date: Thu Dec 8 14:57:07 2022 -0800 disable cell dnd for IW commit e00b25cc55a1150d86fa54f9b997d97daf530379 Author: Peng Lyu <penn.lv@gmail.com> Date: Thu Dec 8 12:13:35 2022 -0800 Fix #111690. Respond to editor find loop setting change. (#168510) commit f51ae96d85daac1f8f9475f78e45bf9704a80a55 Author: Megan Rogge <merogge@microsoft.com> Date: Thu Dec 8 14:12:25 2022 -0600 exitStatus -> commandExitResult (#168257) commit 772c1b592c26c1b32a262c74f3188055915269b8 Author: Matt Bierner <matb@microsoft.com> Date: Thu Dec 8 11:56:16 2022 -0800 Bump distro (#168507) Replaces #168487 commit 8ed4dc537c7c17bb04576bd5450387f167f8b883 Author: Matt Bierner <matb@microsoft.com> Date: Thu Dec 8 11:46:26 2022 -0800 Fix css var name for active parameter hints (#168505) Fixes #168403 commit 6e5b663e9986c043571d1ac4b028c4160db81ae2 Author: Matt Bierner <matb@microsoft.com> Date: Thu Dec 8 11:36:42 2022 -0800 Make sure `lib.d.ts` is included in build (#168501) Fixes #168420 commit c6aaa761fd7a2d24dea85fbb1e9f2737f680e210 Author: David Dossett <ddossett@microsoft.com> Date: Thu Dec 8 11:31:35 2022 -0800 Fix status bar item + remote indicator hover color (#168502) commit 2a04638dba226c219a4cafa1dc542ce60e106992 Author: Matt Bierner <matb@microsoft.com> Date: Thu Dec 8 11:20:30 2022 -0800 Pick up TS 4.9.4 (#168500) For #168354 commit 12d0ff2ef5774a9faab59f79c8229b70c5a8f194 Author: Jean Pierre <jeanp413@hotmail.com> Date: Thu Dec 8 14:18:29 2022 -0500 Fixes pasting into quick outline does not reveal result (#166835) * Fixes #166687 * Also use it in standalone editor Co-authored-by: Benjamin Pasero <benjamin.pasero@gmail.com> commit 4f6f7d50b9941ab4dcd6280f49584c1c66e7b17a Author: Peng Lyu <penn.lv@gmail.com> Date: Thu Dec 8 10:28:07 2022 -0800 Fix #161738. Assert index. (#168495) commit 26607247981d15c9d884881b0c55af15e5ab9e45 Author: Babak K. Shandiz <babak.k.shandiz@gmail.com> Date: Thu Dec 8 21:35:52 2022 +0330 🐛 Fix wrong toggling of `show-checkboxes` style (#168444) commit 69b695bc398824ba2ddc5ee7b90be359f91471f1 Author: Tyler James Leonhardt <me@tylerleonhardt.com> Date: Thu Dec 8 09:42:52 2022 -0800 Revert "Clear quick input dom nodes on hide (#168365)" (#168489) This reverts commit a76d8ef33243bdc9b41c679268c70495f2211478. commit 2804f9884442d6c0f88d3ee0706f65e2ea4e2ade Author: Johannes Rieken <johannes.rieken@gmail.com> Date: Thu Dec 8 18:31:13 2022 +0100 fix https://github.com/microsoft/vscode/issues/140854 (#168461) * avoid spreading thousands of args to function call * avoid unneeded array iterations commit 0200d640897ee13f50628c8a05e9795b6adada9d Author: Johannes Rieken <johannes.rieken@gmail.com> Date: Thu Dec 8 18:26:45 2022 +0100 speed up `parseLabelWithIcons` (#168484) Use a regex instead of traversing the string character by character. This is faster, surprisingly it's also faster than using String.replace with the same regex and a replacer function. Using `big.js` from https://github.com/microsoft/vscode/issues/140661 and running quick open shows a 5-7X speed improvement. However, a few more things seem wrong and too slow commit 6e2ee35d1630b4bb916f35fdbd678848d129547c Merge: 057f3a020d5 93e01a71096 Author: Aaron Munger <aamunger@microsoft.com> Date: Thu Dec 8 09:14:26 2022 -0800 Merge pull request #167977 from amunger/aamunger/outputLineHeight default output line height equal to code cell line height commit 057f3a020d56b7b2bb816fa558162aa815383708 Author: Henning Dieterichs <hdieterichs@microsoft.com> Date: Thu Dec 8 16:58:26 2022 +0100 Updates distro to resolve conflict (#168474) commit 6540afe0841212b5c10facc73bf373bcc7a576a8 Author: João Moreno <joao.moreno@microsoft.com> Date: Thu Dec 8 16:14:46 2022 +0100 screencast: handle duplicate keyboard shortcuts (#168469) fixes #157660 commit 92b394a9a15cc6a12dbf4b7661188757933c2b45 Author: d1y <chenhonzhou@gmail.com> Date: Thu Dec 8 23:11:34 2022 +0800 feat: screencast mode move scale (#156084) Co-authored-by: João Moreno <joao.moreno@microsoft.com> commit 0931ced73741888afcf0e691d0568886894c0508 Author: Henning Dieterichs <hdieterichs@microsoft.com> Date: Thu Dec 8 16:10:26 2022 +0100 adopt textmate refactoring, fixes #167288 (#168468) commit 16e1db245298fe32c2c75c84a24e3061bd60ac45 Author: João Moreno <joao.moreno@microsoft.com> Date: Thu Dec 8 16:04:08 2022 +0100 grid: preserve absolute offsets across orientation flips (#167849) fixes #167816 related to #164327 related to #164287 commit 8875c8e5b86f2f50df823e29723401fc42017d4c Author: João Moreno <joao.moreno@microsoft.com> Date: Thu Dec 8 16:01:23 2022 +0100 better setting description (#168467) fixes #159009 commit 2546aab07280942a24f397633b5b85db6a21198d Author: ohah <bookyoon173@gmail.com> Date: Thu Dec 8 23:59:39 2022 +0900 screencast ime bug fix (#165248) (#165249) * screencast ime bug fix (#165248) * :lipstick: Co-authored-by: João Moreno <joao.moreno@microsoft.com> commit 926f9bb20135ecb7137c1e5861935f1ccf04d984 Author: Sandeep Somavarapu <sasomava@microsoft.com> Date: Thu Dec 8 15:59:01 2022 +0100 Fix #168460 (#168466) commit a265e9e8c6f95335fcce2efc3d0f4b4408df0cb7 Author: Johannes Rieken <johannes.rieken@gmail.com> Date: Thu Dec 8 14:47:47 2022 +0100 fix https://github.com/microsoft/vscode/issues/161734 (#168447) commit 603019055e01457b8593a7c08e86a26c65b6042c Author: Ilya Golovin <74474615+maIIady@users.noreply.github.com> Date: Thu Dec 8 16:44:07 2022 +0300 Fix: make git commands work with keyboard (#159113) * Fix: make git commands work from keyboard * refactor: improve code style commit 1476d6fa71732dd601ba5ca31a228c2988703845 Author: Johannes Rieken <johannes.rieken@gmail.com> Date: Thu Dec 8 14:40:26 2022 +0100 use `StableEditorScrollState` to ensure inlay hints don't move lines vertically (#168443) fixes https://github.com/microsoft/vscode/issues/165312 commit 7f3e92b2b4098d757596685232c92918bb13586c Author: Sean Marshallsay <srm.1708@gmail.com> Date: Thu Dec 8 13:17:50 2022 +0000 Introduce VSCODE_RESOLVING_ENVIRONMENT env var. (#168436) This environment variable is set while VS Code attempts to resolve your environment (i.e. tries to pick up on all the environment variables that you set in your shell startup scripts, such as .bashrc). The purpose of this environment variable is to let users opt out of certain actions while VS Code does this, e.g. to avoid slow processes running or exec lines being executed. Fixes #163186 Co-authored-by: Sean Marshallsay <smarshallsay01@qub.ac.uk> commit 02587612c011621958389ba60803bc03f22ef944 Author: Johannes Rieken <johannes.rieken@gmail.com> Date: Thu Dec 8 14:12:49 2022 +0100 fix https://github.com/microsoft/vscode/issues/168430 (#168434) commit 87c763d477f87c03ea310ebf8d05c1c89735a547 Author: Johannes Rieken <johannes.rieken@gmail.com> Date: Thu Dec 8 13:16:01 2022 +0100 fix `ERR TypeError` (#168432) ``` ERR TypeError: Cannot read properties of undefined (reading 'percentage') at u.analyseBottomUp (vscode-file://vscode-app/Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/out/vs/vs/platform/profiling/electron-sandbox/profileAnalysisWorker.js:3:12186) at l.d (vscode-file://vscode-app/Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/out/vs/base/worker/workerMain.js#CpuProfileAnalysis:17:76770) at Object.handleMessage (vscode-file://vscode-app/Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/out/vs/base/worker/workerMain.js#CpuProfileAnalysis:17:76491) at C.k (vscode-file://vscode-app/Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/out/vs/base/worker/workerMain.js#CpuProfileAnalysis:17:73744) at C.h (vscode-file://vscode-app/Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/out/vs/base/worker/workerMain.js#CpuProfileAnalysis:17:73375) at C.handleMessage (vscode-file://vscode-app/Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/out/vs/base/worker/workerMain.js#CpuProfileAnalysis:17:73307) at l.onmessage (vscode-file://vscode-app/Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/out/vs/base/worker/workerMain.js#CpuProfileAnalysis:17:76551) at self.onmessage (vscode-file://vscode-app/Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/out/vs/base/worker/workerMain.js#CpuProfileAnalysis:8:431) ``` commit 26c9daf849c512521422c2a5ab5f9aa52ec07524 Author: Alex Ross <alros@microsoft.com> Date: Thu Dec 8 11:19:54 2022 +0100 Fire tree selection changed after updating children (#168422) Fixes #167296 commit ed442a9e99ff68a3bb9e4953081305766862f450 Author: Benjamin Pasero <benjamin.pasero@microsoft.com> Date: Thu Dec 8 08:19:06 2022 +0100 debt - reduce unused things (for #164936) (#168390) commit b92894493e6f971a3c71912d823e699d3a05d643 Author: Matt Bierner <matb@microsoft.com> Date: Wed Dec 7 19:52:31 2022 -0800 Add aria widget role for code action widget (#168380) Fixes #167596 commit c0703b6f2f0ab4a007e0b72fff8649b1e2ff6742 Author: Matt Bierner <matb@microsoft.com> Date: Wed Dec 7 17:16:19 2022 -0800 Disable focus border for empty code action list (#168379) Fixes #162681 commit 7981d7f1430f40ce0abe9b71f0d1cc5979367fc5 Author: Matt Bierner <matb@microsoft.com> Date: Wed Dec 7 17:15:09 2022 -0800 Prevent dragging of links in rendered markdown (#168232) Prevent dragging of markdown links Fixes #167308 commit d432fe3966c00ecdbb0d5b1958fade63ef90e4d3 Author: Tyler James Leonhardt <me@tylerleonhardt.com> Date: Wed Dec 7 16:32:23 2022 -0800 remove bad comment (#168376) commit 2c5eea2d544eac38445e62c04663fda2cdba9b13 Author: Peng Lyu <penn.lv@gmail.com> Date: Wed Dec 7 16:16:35 2022 -0800 Fix #163850. Install multiple recommended extensions. (#168374) commit b63dd777183a061579b8945705ec6d6e34165799 Author: Matt Bierner <matb@microsoft.com> Date: Wed Dec 7 16:16:19 2022 -0800 Remove TS extension's use of resolver proposal (#168371) Fixes #164039 commit 812ef50afe2491c4577f63a7b3beed518a631aa7 Author: Connor Peet <connor@peet.io> Date: Wed Dec 7 16:14:41 2022 -0800 smoke: adopt new vscode test version (#168373) Has timeout logic that fixes #166092 commit a76d8ef33243bdc9b41c679268c70495f2211478 Author: Matt Bierner <matb@microsoft.com> Date: Wed Dec 7 16:03:38 2022 -0800 Clear quick input dom nodes on hide (#168365) Fixes #163411 commit 9ad5c4a2054570089d99e9d4813d6da656e7da56 Author: Matt Bierner <matb@microsoft.com> Date: Wed Dec 7 15:56:04 2022 -0800 Use JSX in display names of the `TypeScript React` and `JavaScript React` languages (#168368) Use JSX in display names of the TypeScript React and JavaScript React languages Fixes #138285 This changes the display name of the languages `JavaScript React` -> `JavaScript JSX` and `TypeScript React` -> `TypeScript JSX` This only changes the display names and leaves the ids alone. Changing the ids would be a very breaking change for extensions with no real user benefits commit 1c89f079be8376777da4b40a71a9f57e75326521 Author: Matt Bierner <matb@microsoft.com> Date: Wed Dec 7 15:47:31 2022 -0800 Don't show empty `@return` in JSDoc (#168366) Fixes #164888 commit 636b07085cf2edec912874f5dff0a0bd067fc7ec Author: Matt Bierner <matb@microsoft.com> Date: Wed Dec 7 15:31:23 2022 -0800 Code actions should cancel if bulk edit fails or on cancellation token (#168364) Fixes #153427 commit 68cc61d4ce352e1797e34c10f195f8aba9c85c30 Author: Matt Bierner <matb@microsoft.com> Date: Wed Dec 7 15:22:58 2022 -0800 Fix previewing of code actions (#168362) commit 4300ba22e5fe9dcde30dc1e11c8ad3c069d18d75 Author: Raymond Zhao <7199958+rzhao271@users.noreply.github.com> Date: Wed Dec 7 15:19:11 2022 -0800 Filter some labels from Missing Milestone query (#168360) commit eab8c54b30ec6edf521991f49d7bf49ab8067d8e Author: Tyler James Leonhardt <me@tylerleonhardt.com> Date: Wed Dec 7 15:08:36 2022 -0800 Fix a translation (#168353) commit e25b892af4200b74aadc5dbecf83279e9465b18e Author: Raymond Zhao <7199958+rzhao271@users.noreply.github.com> Date: Wed Dec 7 15:07:03 2022 -0800 Add packaging label to my-work.github-issues (#168358) Also removes duplicate livepreview entries from $repos, and sorts the feature area labels by alphabetical order. commit 48afb8e408ef14af97b8591c52efa11a653195ff Author: David Dossett <ddossett@microsoft.com> Date: Wed Dec 7 15:02:14 2022 -0800 Fix secondary button foreground and hover colors (#168357) Fix secondary button foreground commit fd0ee4f77e354de10ae591c9e97fe5ad41b398fc Author: Matt Bierner <matb@microsoft.com> Date: Wed Dec 7 14:31:35 2022 -0800 Remove explicit support for TS versions < 3.0 (#168348) This removes extra code we had to support TS versions that are 4+ years old. We do not test these versions and a very small number of users are actually using them commit 7153066a51de6636d1eca0945bb1f8746a864662 Author: Peng Lyu <penn.lv@gmail.com> Date: Wed Dec 7 14:21:37 2022 -0800 Fix #150573. Wrong list height calculation with insert toolbar and global toolbar. (#168346) commit 69da698bc07d52b52dec17c5292785810183ba87 Merge: 0dbe0aebb03 80f9ca79a95 Author: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Wed Dec 7 13:41:10 2022 -0800 Merge pull request #168339 from microsoft/tyriar/161481 Fix max link length conditional commit 0dbe0aebb0321dc3595b137ea0d83176e78970fe Author: Ladislau Szomoru <3372902+lszomoru@users.noreply.github.com> Date: Wed Dec 7 22:09:04 2022 +0100 Workspace trust - Rename "Configure Workspace Trust" action (#168340) Rename "Configure Workspace Trust" action commit 80f9ca79a950971de5756bbb37cf9ebbf550c2e0 Author: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Wed Dec 7 12:52:27 2022 -0800 Fix max link length conditional This was a typo, the cols part was meant to be a sanity check for really wide terminals See #161481 commit 1cf6a0823e31e26b55882af02afd41c650d461b8 Author: Ladislau Szomoru <3372902+lszomoru@users.noreply.github.com> Date: Wed Dec 7 20:47:02 2022 +0100 Engineering - Update classifier (#168334) Update classifier commit 62d2aad6a61cb6e9b47f1bd0697c883cd2f0d606 Author: Raymond Zhao <7199958+rzhao271@users.noreply.github.com> Date: Wed Dec 7 10:41:21 2022 -0800 Add preventDefault calls, ref #138175 (#168310) commit 156cc97c88232275391e23f141423cd93b921ddd Author: Ioannis Poulakas <giannis.p@gmail.com> Date: Wed Dec 7 19:37:29 2022 +0200 Improve layout of search input (#165989) * Improve padding of search input on search-view * Improve margin and padding of search input on search-editor * Apply margin on search-editor query-container, fix search-editor message padding * Remove no longer required margin from search-editor includes-excludes commit cc04113a70c23c2524ed4b6fb5ea4ccccbe72c2a Merge: 64deca0f1fd c027fc91ec8 Author: Johannes Rieken <johannes.rieken@gmail.com> Date: Wed Dec 7 18:26:19 2022 +0100 Merge pull request #167624 from laurentlb/main Command duration: use a higher-precision for telemetry commit 64deca0f1fd7a1826a078f73a57675e45d6959cc Author: Alex Ross <alros@microsoft.com> Date: Wed Dec 7 17:38:07 2022 +0100 Enable open port preview in web (#168323) * Revert "Add open preview enabled context (#160898)" This reverts commit df7c2bc5a6f1bda9a41a9657ab6ae326e1e040ec. * Enable open preview in web commit ee0743184dd09b25693f5d3196b97561aafb3c07 Author: Megan Rogge <merogge@microsoft.com> Date: Wed Dec 7 10:04:37 2022 -0600 report problem if there's no workspace folder (#168209) fix #164051 commit 3d4db6a54609393ce5a3953b70d944ef4c8bdc51 Author: Sandeep Somavarapu <sasomava@microsoft.com> Date: Wed Dec 7 16:38:16 2022 +0100 fix #147280 (#168317) commit 650dd8f7d4d341cf8c290cdd9391884b8c143f46 Author: Alexandru Dima <alexdima@microsoft.com> Date: Wed Dec 7 16:32:29 2022 +0100 Update the anchor's view position when content changes (#168316) Fixes #147329: Update the anchor's view position when content changes commit d52bd1bdc1f37716bdafd72eec8eb6e6e2f88a10 Author: Johannes Rieken <johannes.rieken@gmail.com> Date: Wed Dec 7 16:21:48 2022 +0100 joh/electric hare (#168315) * add `peekViewEditorStickScroll.background` color and use for sticky scroll in peek editor * :lipstick: align keyword & naming style, init fields at declaration commit 3f89b2fbf39b573057cef4e6b400d119647be49d Author: Martin Aeschlimann <martinae@microsoft.com> Date: Wed Dec 7 16:15:36 2022 +0100 handlebars extension not acivated in remote window (#168313) commit 93db2051b988e07f6c1e11edee5fe4a43b3b6d33 Author: Alexandru Dima <alexdima@microsoft.com> Date: Wed Dec 7 16:11:02 2022 +0100 Honour `inSelectionMode` (#168312) Fixes #158236: Honour `inSelectionMode` commit 1bd8fa75da9a28d7858b967dc3218f8bb1cbea1c Author: Han <weartistt@gmail.com> Date: Wed Dec 7 22:55:54 2022 +0800 css variables for welcomeOverlay (#166330) commit bc841060949cd8ddb5f42f863e10d7f46ae9c67c Author: Han <weartistt@gmail.com> Date: Wed Dec 7 22:54:37 2022 +0800 css variables for walkThroughPart (#166547) commit 4bc45e900ea2274838234dd01dd572b6b44f7567 Merge: b054a1b1f08 490e6104897 Author: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Wed Dec 7 06:49:02 2022 -0800 Merge pull request #168242 from microsoft/tyriar/161064 Fix NPE in terminal link helpers commit b054a1b1f080ed06e671a6dbfe64bdea202b05c2 Merge: 386459dec04 7c85e3c2c6d Author: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Wed Dec 7 06:48:39 2022 -0800 Merge pull request #168240 from microsoft/tyriar/158066 Ignore trailing ':<non number>' in terminal word links commit 386459dec0490aed8a67a1b94dc978a3307982eb Author: Johannes Rieken <johannes.rieken@gmail.com> Date: Wed Dec 7 15:22:52 2022 +0100 fix https://github.com/microsoft/vscode/issues/146171 (#168307) commit 9d1c2920c0d4a433af493b3777b0e8d45088299b Author: N1kO23 <59277828+N1kO23@users.noreply.github.com> Date: Wed Dec 7 15:51:38 2022 +0200 Added `${rootNameShort}` formatting (#165744) * Added ${rootNameShort} formatting * Add unit tests for label that use rootNameShort * move `Verbose` interface to a better location * more support * :lipstick: * fix tests Co-authored-by: Benjamin Pasero <benjamin.pasero@microsoft.com> commit 45324363153075dab0482312ae24d8c068d81e4f Author: Alex Ross <alros@microsoft.com> Date: Wed Dec 7 14:44:00 2022 +0100 Exclude strings from HTML grammar patch (#168306) Fixes #160549 commit f7c5c0dbabc8275f47995065b752672e23bee081 Author: Benjamin Pasero <benjamin.pasero@microsoft.com> Date: Wed Dec 7 14:18:54 2022 +0100 Unexpected filenames proposed when saving untitled files (fix #150164) (#168278) commit 911e119dfc7c7133df4aec1d769d5671dd65a338 Author: Sandeep Somavarapu <sasomava@microsoft.com> Date: Wed Dec 7 14:17:58 2022 +0100 fix #168299 (#168303) commit 5653cef8da301b534a5b53b9ad920b10d3a58257 Author: Johannes Rieken <johannes.rieken@gmail.com> Date: Wed Dec 7 14:15:20 2022 +0100 joh/probable macaw (#168285) * fix https://github.com/microsoft/vscode/issues/167845 made choice completion item provider exclusive so that only it is being asked * fix https://github.com/microsoft/vscode/issues/167386 * fix compile errors commit 28832f37e282ea01a1d82a08bc7a1f4f34b2b069 Author: Ladislau Szomoru <3372902+lszomoru@users.noreply.github.com> Date: Wed Dec 7 13:27:35 2022 +0100 Git - Do not pop the stash as part of the "Stash & Checkout" action (#168297) commit 6aa9ea1b7bc428186a64b605f1d74092ab4b8ad9 Author: Johannes Rieken <johannes.rieken@gmail.com> Date: Wed Dec 7 13:06:15 2022 +0100 fix https://github.com/microsoft/vscode/issues/152553 (#168291) commit 70640451579ba746a411605b50d1c83261613962 Author: Matt Bierner <matb@microsoft.com> Date: Wed Dec 7 01:36:32 2022 -0800 Use variadic tuples to simplify typing of `h` (#166392) commit 0f8bf1b66bf00d7be5ee749be980e6cae188c7ae Author: Ladislau Szomoru <3372902+lszomoru@users.noreply.github.com> Date: Wed Dec 7 10:36:02 2022 +0100 Git - Fix error handling regression (#168284) Fix error handling regression commit a4e9665ba28df61b087633bb8a2fa9807172e4ab Merge: 29b11721622 6d7c12fe841 Author: Johannes Rieken <johannes.rieken@gmail.com> Date: Wed Dec 7 10:33:48 2022 +0100 Merge pull request #168266 from mroch/anyscore fix anyScore firstMatchCanBeWeak commit 29b117216229e4cfdd3d95fd4cb83ad4c37529fc Merge: a77a33a237e c2e5f8a5e9a Author: Henning Dieterichs <notify.henning.dieterichs@live.de> Date: Wed Dec 7 10:27:45 2022 +0100 Merge pull request #164225 from weartist/diff_find_result_loop_support Fix Setting to disable loop of "next change" in diff view #163331 commit a77a33a237e1ad63adbfdf99cdf1c3d0ccabdb0c Author: Johannes Rieken <johannes.rieken@gmail.com> Date: Wed Dec 7 10:04:47 2022 +0100 fix https://github.com/microsoft/vscode/issues/167845 (#168282) made choice completion item provider exclusive so that only it is being asked commit cb1613302edf2722032fcca42f84c925a3077f9d Author: Sandeep Somavarapu <sasomava@microsoft.com> Date: Wed Dec 7 09:55:43 2022 +0100 fix #157499 (#168280) commit 7ca99004a50625858c0c2c0dbc2a9845e41a7dea Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed Dec 7 09:26:10 2022 +0100 Bump qs from 6.10.1 to 6.11.0 in /build (#168174) Bumps [qs](https://github.com/ljharb/qs) from 6.10.1 to 6.11.0. - [Release notes](https://github.com/ljharb/qs/releases) - [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md) - [Commits](https://github.com/ljharb/qs/compare/v6.10.1...v6.11.0) --- updated-dependencies: - dependency-name: qs dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 206f45ec2963de2465c9a53c5a20f3170fcf2b83 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed Dec 7 09:25:40 2022 +0100 Bump qs from 6.5.2 to 6.5.3 (#168181) Bumps [qs](https://github.com/ljharb/qs) from 6.5.2 to 6.5.3. - [Release notes](https://github.com/ljharb/qs/releases) - [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md) - [Commits](https://github.com/ljharb/qs/compare/v6.5.2...v6.5.3) --- updated-dependencies: - dependency-name: qs dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 78948c54d2b3b5608b3cfce33b9d8d7308d7da5a Author: Alexandru Dima <alexdima@microsoft.com> Date: Wed Dec 7 09:25:01 2022 +0100 Forward the configured value for `editor.cursorBlinking` (for accessibility purposes) (#168217) Fixes #131941: Forward the configured value for `editor.cursorBlinking` (for accessibility purposes) commit dd86970478634ba944092bf4db7ea083a1ddbae2 Author: Benjamin Pasero <benjamin.pasero@microsoft.com> Date: Wed Dec 7 09:04:32 2022 +0100 "Go to Definition" with multiple definitions and "Peek Definition" change preview editor statuses differently (fix #152914) (#168275) commit c0f6c67a090bf17be0c78e0e8544e6f91268edd9 Author: Matt Bierner <matb@microsoft.com> Date: Tue Dec 6 21:00:11 2022 -0800 Pick up latest markdown-it katex (#168269) For #149295 commit 3028ad09238dfdbd90a172e8170b6cb66aa81cbf Author: Rob Lourens <roblourens@gmail.com> Date: Tue Dec 6 22:55:12 2022 -0600 Fix breakpoint gutter hover while paused (#168264) Fix #130904 commit 6d7c12fe8412a94490c09cc31f15fae9dad226e5 Author: Marshall Roch <mroch@fb.com> Date: Tue Dec 6 22:27:39 2022 -0500 fix anyScore firstMatchCanBeWeak commit 1c85aeab6777c0cd07d847a8c7fa0daff22473be Author: Matt Bierner <matb@microsoft.com> Date: Tue Dec 6 18:36:13 2022 -0800 Remove extra service properties (#168256) This replaces everywhere in our code where we had the following: ``` @IService readonly service: IService ``` This creates a publicly accessible service, which is almost never what you want. Instead these services should either be private or only passed in as constructor arguments commit 220f9387c973de4cc44c545642ad2c90170bd3ef Author: Matt Bierner <matb@microsoft.com> Date: Tue Dec 6 16:34:19 2022 -0800 Fix showing keybindings in code action widget (#168254) This also refactors how keybindings are passed in to remove the concept of a `IActionKeybindingResolver` commit a49a1db99eb516118c00c59aceaeb1f835aecf98 Author: David Dossett <ddossett@microsoft.com> Date: Tue Dec 6 16:10:09 2022 -0800 Fix tab close icon margin when positioned on the left (#168252) commit 16e769875124fa24d210c6310a8551b9a4c68e07 Author: Matt Bierner <matb@microsoft.com> Date: Tue Dec 6 16:09:05 2022 -0800 Shorten update import labels (#168250) Fixes #165907 This aligns with the markdown update imports UI commit 9a8f118aa9901f1f4835c4ac9d6d7eac3f85c55b Author: David Dossett <ddossett@microsoft.com> Date: Tue Dec 6 16:03:05 2022 -0800 Match quick pick button height to input height (#168251) commit f1ae1403f71ead70c1e4296092394c7352545180 Author: Peng Lyu <penn.lv@gmail.com> Date: Tue Dec 6 15:53:51 2022 -0800 Fix #154986. Update clear outputs action name (#168249) commit df0c79cfec906e4b5d4da5a3bc4ef6c3bd4538a7 Author: David Dossett <ddossett@microsoft.com> Date: Tue Dec 6 15:49:07 2022 -0800 Update focus border in hc-light theme (#168247) commit 12378f3f5f512678585bd63d7320b0205760d421 Author: Joyce Er <joyce.er@microsoft.com> Date: Tue Dec 6 15:40:59 2022 -0800 Update my-work.github-issues (#168245) commit 2f2e4e17626a0fc7e59f24e1383191d0f0c3b65c Author: Connor Peet <connor@peet.io> Date: Tue Dec 6 15:23:47 2022 -0800 debug: bump js-debug (#168238) commit c060963f3d4ebf02259fae41de9c3ac19ef829ed Author: David Dossett <ddossett@microsoft.com> Date: Tue Dec 6 15:23:23 2022 -0800 Fix missing list focus outlines in settings UI (#168243) Fix settings UI table focus commit dd830ee0284aa31a7268a669b16f9bb6084b677d Merge: 69c8a7594d5 3d3db02a073 Author: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Tue Dec 6 15:10:03 2022 -0800 Merge pull request #168222 from microsoft/tyriar/166701 Always fallback to monospace in the terminal commit 69c8a7594d5efbc391d873157184b0317991cd11 Merge: 7b83bc62ad9 533678ede69 Author: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Tue Dec 6 15:04:37 2022 -0800 Merge pull request #168228 from microsoft/tyriar/166506 Show Terminal menu on web commit 7b83bc62ad9ce1d141512f8ec67dda7615765f88 Merge: 2a3467e7aac 692791d8a8f Author: Joyce Er <joyce.er@microsoft.com> Date: Tue Dec 6 15:03:46 2022 -0800 Merge pull request #167867 from microsoft/dev/joyceerhl/jolly-takin Add `onLanguage` activation event for Emmet commit 2a3467e7aacff8dab141a7a49913098a66f1d941 Author: Matt Bierner <matb@microsoft.com> Date: Tue Dec 6 14:56:18 2022 -0800 Pick up latest TS for building VS Code (#168236) commit 07a8c6752e4f618c953ced0d91c4bbee42ee7da0 Author: David Dossett <ddossett@microsoft.com> Date: Tue Dec 6 14:52:11 2022 -0800 Improve focus border contrast for quiet light, solarized light, and monokai themes (#168237) Fix #165386 commit 490e610489793a74fab227b071fb3af3062d4482 Author: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Tue Dec 6 14:51:28 2022 -0800 Fix NPE in terminal link helpers Fixes #161064 commit 7c85e3c2c6d382002f5dd6ac09026f90a02843fa Author: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Tue Dec 6 14:48:38 2022 -0800 Ignore trailing ':<non number>' in terminal word links Fixes #158066 commit eefd5edc4dd6cd8234c4761e5356e3ec49349560 Author: David Dossett <ddossett@microsoft.com> Date: Tue Dec 6 14:48:03 2022 -0800 Remove old/unused walkthrough images (#168235) * Remove old/unused walkthrough images * Remove more.png commit 23ce9daef814d1abb1b5d2bd83a8cc1cf71f5d72 Author: Matt Bierner <matb@microsoft.com> Date: Tue Dec 6 14:47:55 2022 -0800 Adopt css colors in parameter hints widget (#168234) * Adopt css colors in parameter hints widget For #165169 * Add opacity to borders commit a3ce458be08c2434287567af5e19896cbc5b2804 Author: David Dossett <ddossett@microsoft.com> Date: Tue Dec 6 14:24:55 2022 -0800 Fix status bar hover/active background (#168233) commit ac88f33e2ca851839a3cd2a972377558f654e0a6 Author: Matt Bierner <matb@microsoft.com> Date: Tue Dec 6 13:50:30 2022 -0800 Revert "Fix: New md file scrolls to Top. (#164999)" (#168224) This reverts commit 54543cf5bf178600cfea17355b4c201877132b5b. commit 3d3db02a073476b96a97852763f73ed814e0d8ad Author: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Tue Dec 6 13:48:53 2022 -0800 Fix tests to include fallback font commit 533678ede69d343f692c126ce7914efd5a3569c8 Author: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Tue Dec 6 13:46:50 2022 -0800 Show Terminal menu on web Fixes #166506 commit 94acd2c0859f973740466334fe95c2f8b9700751 Author: Alexandru Dima <alexdima@microsoft.com> Date: Tue Dec 6 22:29:13 2022 +0100 Change the default of `editor.renderFinalNewline` to `dimmed` on Linux (#168220) Fixes #141169: Change the default of `editor.renderFinalNewline` to `dimmed` on Linux commit ef05bd2e6099981ac4df1f65afdf72cbae5c6663 Author: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Tue Dec 6 13:22:48 2022 -0800 Always fallback to monospace in the terminal Fixes #166701 commit 2b642e1c98da8859a7f0f3a428e0268a74b5de2f Author: Tyler James Leonhardt <me@tylerleonhardt.com> Date: Tue Dec 6 13:19:22 2022 -0800 Define 'language' for translators (#168118) * define 'language' for #129029 * Update src/vs/workbench/contrib/codeEditor/browser/untitledTextEditorHint/untitledTextEditorHint.ts Co-authored-by: John Murray <johnm@georgejames.com> Co-authored-by: John Murray <johnm@georgejames.com> commit 3c84e0d7637df08ffe1e88b63a02d5a684eaab3a Author: Megan Rogge <merogge@microsoft.com> Date: Tue Dec 6 14:40:31 2022 -0600 tweak command name (#168214) fix #143701 commit 73c9764d50eb394decc1f506622d72fc77d543a0 Author: Connor Peet <connor@peet.io> Date: Tue Dec 6 12:29:59 2022 -0800 testing: allow work after user interrupts test (#168212) Gives a 10 seconds timeout for test extensions to tear down and write out remaining messages, instead of immediately finalizing the run when the user clicks the stop button. Users can also click the test button again to forcefully end the run. commit bafda10a370cd7ac835c4a88f5885bf69e02037e Author: Alexandru Dima <alexdima@microsoft.com> Date: Tue Dec 6 21:17:10 2022 +0100 Make `setContext` an API command (#168215) Fixes #46445: Make `setContext` an API command commit 07892e4ef2f555e999da8e7d8c1dbd23973b3470 Author: Alexandru Dima <alexdima@microsoft.com> Date: Tue Dec 6 20:45:57 2022 +0100 Move more style rules to css (#168210) commit 1d7f9302466e24fe8a71a09c490c713914422cf4 Author: Mikl Wolfe <wolfemikl@gmail.com> Date: Tue Dec 6 12:30:26 2022 -0700 Remove repository.ts default parameter types (#155908) * Remove closeDiffEditors inferred parameter type * Remove pushTo inferred parameter type * Remove _push inferred parameter type * Remove isBranchProtected inferred parameter type commit e381480cd48ad479d2aceda02abf014003f720a6 Author: Megan Rogge <merogge@microsoft.com> Date: Tue Dec 6 13:29:29 2022 -0600 part of #167239 (#168208) fix #167417 commit 0bae6f7964294eb2c6a3781ffc54ab4937b89225 Author: Megan Rogge <merogge@microsoft.com> Date: Tue Dec 6 13:13:06 2022 -0600 register command selectors as first priority in terminal quick fix addon (#168206) fix #168154 commit aa6168def926b1bef05f3c7d364c347348dadb16 Author: Megan Rogge <merogge@microsoft.com> Date: Tue Dec 6 13:09:50 2022 -0600 pull accessibility mode out of editor status (#168103) commit 8893a1494149e5a85bad1a471ec73ba65b10859b Author: SteVen Batten <6561887+sbatten@users.noreply.github.com> Date: Tue Dec 6 11:02:49 2022 -0800 add mnemonic note (#168204) fixes #149794 commit 125fd89ceeec582f755801d1dff306b9e5a2258b Author: Connor Peet <connor@peet.io> Date: Tue Dec 6 10:56:38 2022 -0800 testing: prefer to show description in test tooltip (#168203) Showing the label is redundant in the explorer view where the label is shown in the tree item. Prefer showing the description. Fixes #166374 commit fa0e000e1d24f3b64117da6371200aee801e7243 Author: Alexandru Dima <alexdima@microsoft.com> Date: Tue Dec 6 19:45:30 2022 +0100 Extract highlight decorations to a separate file (#168185) * Extract highlight decorations to a separate file * Fix CSS import commit e37eabca53a90f8b2beb6261e149804aabdfc3d9 Author: Martin Aeschlimann <martinae@microsoft.com> Date: Tue Dec 6 19:33:00 2022 +0100 Folded folding ranges should be displayed on the minimap with darkened background (#168198) commit c16bf3470b591d6e5e353eafaaf31d299de6680d Author: Alexandru Dima <alexdima@microsoft.com> Date: Tue Dec 6 18:36:06 2022 +0100 Fix typo (#168191) Fixes #167319: typo commit d08acd8f1a33faeb081294fcabc73c81bd308654 Author: Johannes Rieken <johannes.rieken@gmail.com> Date: Tue Dec 6 18:04:26 2022 +0100 fix https://github.com/microsoft/vscode/issues/167242 (#168189) Bring existing items by provider to the suggest-call, refactor trigger options into one argument-object, simpily completionModel commit 3b4ff9460745a68abd10d7a15487b788c6821e63 Author: Connor Peet <connor@peet.io> Date: Tue Dec 6 08:30:40 2022 -0800 search: fix faulty replacements in crlf files with lf regex (#168124) Fixes https://github.com/microsoft/vscode/issues/165700 Regex normalization was actually working fine (finally). The issue was JS code was matching again to do the replacement. If the original regex only was written for LF, but the file was CRLF, VS Code did not attempt to normalize line feeds until it tried to pull the surrounding content as well as a 'last resort'. If the surrounding content included a match before the intended one, then that would be used instead, resulting in the bug. PR does a small style change to add early returns to avoid nesting. commit dac409ee91dd31e8dbcff5bab57fe5edaaea6209 Author: Martin Aeschlimann <martinae@microsoft.com> Date: Tue Dec 6 16:52:23 2022 +0100 set virtualWorkspaces: limited (#168177) commit accdf1078f412be9c241b4a9d2295be9da30576a Author: Johannes Rieken <johannes.rieken@gmail.com> Date: Tue Dec 6 15:55:01 2022 +0100 fix https://github.com/microsoft/vscode/issues/159914 (#168175) commit 6adec5fc8e9b9199bd260aa4c557d9666a38749d Author: Megan Rogge <merogge@microsoft.com> Date: Tue Dec 6 08:51:44 2022 -0600 update description of `editor.accessibilitySupport` (#168104) commit 73221ee0464eacf8af8cbd555597f67b076696f4 Author: Mikl Wolfe <wolfemikl@gmail.com> Date: Tue Dec 6 07:03:22 2022 -0700 Update git config.followTagsWhenSync definition (#155914) commit f3110d3367e8e24f1a7d3b78dc602dd97918303b Author: Ladislau Szomoru <3372902+lszomoru@users.noreply.github.com> Date: Tue Dec 6 14:53:42 2022 +0100 Engineering - Exclude engineering label from missing types query (#168170) Exclude engineering label from missing types query commit fac2283bf3aa7a0cd31d77dafcbbfd72bec26391 Author: Sandeep Somavarapu <sasomava@microsoft.com> Date: Tue Dec 6 14:50:23 2022 +0100 fix string.replace (#168169) fix string.replace #167239 commit a18f1c39eafacb909ff11784dc2bc5d221f545bd Merge: c0799f03087 162f221b780 Author: Henning Dieterichs <notify.henning.dieterichs@live.de> Date: Tue Dec 6 14:49:09 2022 +0100 Merge pull request #167687 from ssigwart/tabWithEnter Fix paste removing indent commit c0799f030870d62b33297b179a48732c50c4d84b Author: Henning Dieterichs <notify.henning.dieterichs@live.de> Date: Tue Dec 6 14:38:52 2022 +0100 Fixes #168068 (#168163) * Fixes #168068 * Fixes test commit 62d8f662fbba80d8ad6f58b6d87b1975c40577ce Author: Johannes Rieken <johannes.rieken@gmail.com> Date: Tue Dec 6 14:34:20 2022 +0100 prevent empty markdown string from appearing in the hover (#168168) fixes https://github.com/microsoft/vscode/issues/162227#issuecomment-1337563966 commit 37a74f9e412e7bceee79c86b1d7f8ac5c2ec669d Author: Sandeep Somavarapu <sasomava@microsoft.com> Date: Tue Dec 6 14:33:44 2022 +0100 fix #167594 (#168167) commit 538a24d5051c00c931c2655bc47bc609b6b8c936 Author: Johannes Rieken <johannes.rieken@gmail.com> Date: Tue Dec 6 12:35:15 2022 +0100 use `IWorkbenchExtensionEnablementService` because know when a globally disabled extension is workspace enabled (#168161) fixes https://github.com/microsoft/vscode/issues/160460 commit 711bdf0066a4b8ecd62eda414ff9aa9478d73791 Author: Ladislau Szomoru <3372902+lszomoru@users.noreply.github.com> Date: Tue Dec 6 12:31:06 2022 +0100 Engineering - Add workbench-banner label (#168160) Add workbench-banner label commit 12988f1ea0b7388f35ab79b1d9cfa24cfca9f872 Author: Benjamin Pasero <benjamin.pasero@microsoft.com> Date: Tue Dec 6 12:13:10 2022 +0100 debt - clean up some todos (#168158) commit c4d4c382c24a92993fd529406461a8440a9387a4 Author: Alex Ross <alros@microsoft.com> Date: Tue Dec 6 09:56:32 2022 +0100 Tree item dnd item for `text/plain` reveal it id (#168145) Fixes #145687 commit 27a83dea309101fb984c2bab8dffd783ee67e8e5 Author: Peter Strömberg <pez@pezius.com> Date: Tue Dec 6 08:18:35 2022 +0100 Enable monospaced digits for statusbar items (#167310) * Enable monospaced digits for statusbar items Addressing: #167304 * Use `font-variant-numeric` instead Co-authored-by: Benjamin Pasero <benjamin.pasero@microsoft.com> commit 25a406de7b3e0895f35eaac8cc2902b482734dd1 Author: Tyler James Leonhardt <me@tylerleonhardt.com> Date: Mon Dec 5 23:17:56 2022 -0800 Don't expose command center in the command palette and remove 'Launch' in name (#168126) Fixes #166503 commit c0c052077c84495c473fc8287210986047afbcbf Author: Peng Lyu <penn.lv@gmail.com> Date: Mon Dec 5 23:16:21 2022 -0800 Re #166603. Avoid visibility change in override. (#168122) commit d253ab2adc06fae5e2d30facf17e65d0ead60d25 Author: Sandeep Somavarapu <sasomava@microsoft.com> Date: Tue Dec 6 08:15:12 2022 +0100 fix #162380 (#168115) * fix #162380 - Handle 405 error - Clean up remote data when 405 occurs - Check for too many profiles locally - fix merging profiles - remove created collections when updaing profiles fail * fix tests commit 4b148a70a835dd1f3ed1d36710ec5192a38fc532 Author: Google Henrik <101328101+mueheg@users.noreply.github.com> Date: Tue Dec 6 07:41:24 2022 +0100 Do not select full contents of inputbox before selecting a range, fixes #167266. (#167274) Do not select full contents of inputbox before selecting a range. Co-authored-by: Benjamin Pasero <benjamin.pasero@microsoft.com> commit 9df51e1cdd092547d41c7f2d37d51c73980460bc Author: Benjamin Pasero <benjamin.pasero@microsoft.com> Date: Tue Dec 6 07:28:32 2022 +0100 Notifications: cannot navigate into link via keybindings (fix #163086) (#167980) commit 162f221b7806ca80266b0ae36c4d28a9c5929951 Author: Stephen Sigwart <ssigwart@gmail.com> Date: Mon Dec 5 23:26:06 2022 -0500 Added test commit e79a401ba5f6bc8eff07bfffaf4544e96f394837 Author: Bhavya U <bhavyau@microsoft.com> Date: Mon Dec 5 15:38:24 2022 -0800 Create new files in walkthrough steps on the right if... (#168119) Create new files in walkthrough steps on the right if there are no other editor groups. commit 782e13ba445a450c9f52b24a5c77ad6fb336c305 Author: Tyler James Leonhardt <me@tylerleonhardt.com> Date: Mon Dec 5 15:21:21 2022 -0800 Update replace calls to use functions (#168120) update replace calls ref #167239 commit fac8c645d47cca1eec710ae1c8eddae18d753152 Author: Rob Lourens <roblourens@gmail.com> Date: Mon Dec 5 17:20:02 2022 -0600 Add Eleanor to ssh label (#168117) commit 77c3ff054dfb49bf403231cca793d917813aec4e Author: Raymond Zhao <7199958+rzhao271@users.noreply.github.com> Date: Mon Dec 5 14:56:31 2022 -0800 Add minimum value to window.zoomLevel (#168116) Fixes https://github.com/microsoft/vscode/issues/155185 commit b27ee6b7b549193ba18972b2f968a273e329481d Author: Martin Aeschlimann <martinae@microsoft.com> Date: Mon Dec 5 23:49:27 2022 +0100 [html/css/json] pass the location of the localization bundle to the server (#168111) pass the location of the localization bundle to the server commit 6e3976f744d8de1ee12718256743bf3b2188565e Author: Matt Bierner <matb@microsoft.com> Date: Mon Dec 5 12:41:15 2022 -0800 Update repos and labels in my-work (#168108) commit d62fb120a43785ab75cababe803fe0c8bdaa17be Author: Matt Bierner <matb@microsoft.com> Date: Mon Dec 5 12:13:24 2022 -0800 Pick up latest markdown language server (#167869) commit 93687007ed5af25da14f1cd31fa2c162274c6bea Author: Andrea Mah <31675041+andreamah@users.noreply.github.com> Date: Mon Dec 5 12:09:42 2022 -0800 Add me to search-related tags for classifier (#168095) add andrea to search tags for classifier commit 9f43a4ffda7c9748e2c16e8849cea009fea6c4da Author: David Dossett <ddossett@microsoft.com> Date: Mon Dec 5 11:41:50 2022 -0800 Add experimental default dark/light v2 themes (#167104) * Add experimental default dark/light themes * Update themes and name * Add colorizer test results * Update accent color * Fix status bar no folder background issue * Fix tree indent strokes * Update lighter layer * Fix breadcrumbs * Update accent * Update light lights and dark links * Update colorizer test commit 26f31fa49367f8f0c5ab84658bf7813a2183498a Author: David Dossett <ddossett@microsoft.com> Date: Mon Dec 5 11:12:30 2022 -0800 Update codicons (#168107) Update coficons commit 30c3bf46a2633ccd148a9310f339ac91bf2f3252 Author: Matt Bierner <matb@microsoft.com> Date: Mon Dec 5 10:59:39 2022 -0800 Add missing milestone query (#168105) commit 7af646716e9889ec1736e231cf3f3f037f5b2dbd Author: Logan Ramos <lramos15@gmail.com> Date: Mon Dec 5 11:56:33 2022 -0500 Fix missing isMeasurement (#168091) commit bf93e1d91283dd6777507e6765d23a4be173923f Author: Johannes Rieken <johannes.rieken@gmail.com> Date: Mon Dec 5 17:47:32 2022 +0100 update notebook milestones (#168090) commit 4133f2d5a209f5088b7f5a913ded48726e1bc9aa Author: Matt Bierner <matb@microsoft.com> Date: Mon Dec 5 08:17:53 2022 -0800 Try to skip removing list dom nodes when a list is being rapidly scrolled (#164340) Try to skip removing list elements from the dom when a list is being rapidly scrolled When rapidly scrolling a list, we always and up removing an element from the dom. This element is then inserted back into the dom on the next update. It would be better if we simply skipped removing the element from the dom in this case I've tried to fix this but there may be a better approach. This PR makes the following changes: - Switch the order of remove and insert in `ListView.render`. Now we always call remove before calling insert. This lets the removed row be reused within the same `render` frame - In the `rowCache`, introduce the concept of a transaction. This lets us defer actually removing nodes from the dom until the transaction is completed. In many cases (especially when scrolling rapidly), the row's dom node will actually be reused by `alloc` before this happens so we can skip the removal entirely commit 20876603deed7f7bc6c9f244b8583f5d6502f2e3 Merge: 08024bac3e9 3cb257398f3 Author: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Mon Dec 5 07:02:52 2022 -0800 Merge pull request #168069 from microsoft/Tyriar-patch-1 Explicitly assign terminal links/tabs commit 08024bac3e959ab8cce63d7025dc95428d1ef1a5 Author: Martin Aeschlimann <martinae@microsoft.com> Date: Mon Dec 5 15:45:27 2022 +0100 vscode-notebooks: add repo:microsoft/vscode-remote-tunnels (#168082) commit dcc6d8f54e620d8841ce36a2cf92d1d03c2a134f Author: Johannes Rieken <johannes.rieken@gmail.com> Date: Mon Dec 5 15:43:03 2022 +0100 re-order `WorkspaceEdit#set` overloads (#168083) https://github.com/microsoft/vscode/issues/162054 commit 11367ba900e8e54fa46707adac5e7d20dec41604 Author: Megan Rogge <merogge@microsoft.com> Date: Mon Dec 5 08:42:15 2022 -0600 apply change to all windows (#167998) fix #167997 commit eef3e6a720e565cdbd1f3d77198f72c365ee16fc Author: Logan Ramos <lramos15@gmail.com> Date: Mon Dec 5 09:41:05 2022 -0500 Remove incorrect isMeasurement (#168084) commit a642f1816eed4dd578a3dcf3e62d989dcf01caaa Author: Martin Aeschlimann <martinae@microsoft.com> Date: Mon Dec 5 15:31:02 2022 +0100 Improve color documention error message (#168078) commit b2a7c9aac56f8e3321118685496be283ca450a29 Author: Johannes Rieken <johannes.rieken@gmail.com> Date: Mon Dec 5 15:15:47 2022 +0100 don't export TextEditorEdit (#168080) https://github.com/microsoft/vscode/issues/164940 commit 1e4ac3149ef3ed48115663b92caa128aedff91da Author: Martin Aeschlimann <martinae@microsoft.com> Date: Mon Dec 5 15:01:19 2022 +0100 folding: replace registerThemingParticipant (#168079) commit c0aae4e71e2b11213586e8cc67e4e6f7de775847 Author: Alex Ross <alros@microsoft.com> Date: Mon Dec 5 14:53:06 2022 +0100 tunnel view - use CSS variables over `registerThemingParticipant` (#168077) Par of #165169 commit fc8dcad58f0bed637a39ee3aeaa38a14dd4f5194 Author: Alex Ross <alros@microsoft.com> Date: Mon Dec 5 14:35:55 2022 +0100 Fix heuristic port logging (#168074) commit 46240d5251b935d04005be3a6d4832ab517b5920 Author: Megan Rogge <merogge@microsoft.com> Date: Mon Dec 5 06:50:51 2022 -0600 add new line when running extension quick fix command (#167973) commit e5cd2a8dbe0d6c13eba8c62822ce6e24a21b2fc6 Merge: 42b0cb737a1 457420737c9 Author: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Mon Dec 5 04:47:29 2022 -0800 Merge pull request #167955 from microsoft/tyriar/147630 Include {} in shell env json regex match commit 42b0cb737a115f1c9ad0ec88df010846472e73ab Author: Alexandru Dima <alexdima@microsoft.com> Date: Mon Dec 5 13:45:55 2022 +0100 Fixes #167785 (#167880) commit f6b21f5097bf4454ad71c1f27cd850e63bc1fbd6 Merge: 84527417fe3 f48e13440b7 Author: Henning Dieterichs <notify.henning.dieterichs@live.de> Date: Mon Dec 5 13:09:39 2022 +0100 Merge pull request #168066 from microsoft/hediet/previous-crow Addresses #166969 commit 84527417fe3caafc61091fe89fc98a9d9a9882e5 Author: Ladislau Szomoru <3372902+lszomoru@users.noreply.github.com> Date: Mon Dec 5 12:57:14 2022 +0100 Engineering - Update classifier (#168063) Update classifier commit 3cb257398f38340fc3075415b267b4c33ccb8fdb Author: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Mon Dec 5 03:56:02 2022 -0800 Explicitly assign terminal links/tabs These are areas we are trying to split issue duties on commit 9748eee64bb5e620854060ab558c4943544e11c3 Author: Henning Dieterichs <notify.henning.dieterichs@live.de> Date: Mon Dec 5 12:10:00 2022 +0100 Removes IObservable from audio cue service API (#168065) commit f48e13440b72adea3e031553df78ce6ea7faba8d Author: Henning Dieterichs <hdieterichs@microsoft.com> Date: Mon Dec 5 12:03:58 2022 +0100 Addresses #166969 commit 1574c25b3baa8a52aa3614a6549607179b56a7aa Author: Alexandru Dima <alexdima@microsoft.com> Date: Mon Dec 5 11:28:35 2022 +0100 update labels (#168061) * Sort labels * update labels commit f4c8442fbfef97c8ad5ccfac5e0f0d4a32743041 Merge: 0899758daee d7c7310f613 Author: Johannes Rieken <johannes.rieken@gmail.com> Date: Mon Dec 5 11:15:16 2022 +0100 Merge pull request #167718 from chouzz/fix-api-description Fix incorrect descripti…
- Advisor
- katex
- functions
- katex.ParseError
View all katex analysis
To help you get started, we’ve selected a few katex examples, based
on popular ways it is used in public projects.
Secure your code as it’s written. Use Snyk Code to scan source code in
minutes — no build needed — and fix issues immediately.
{},
{
displayMode: !!props.block,
errorColor: props.errorColor,
throwOnError: !!props.renderError
},
// you can rewrite all KaTeX options directly
props.settings
)
);
return (
<Component {...otherProps} dangerouslySetInnerHTML={{ __html: html }} />
);
} catch (error) {
if (error instanceof KaTeX.ParseError || error instanceof TypeError) {
return props.renderError ? (
props.renderError(error)
) : (
<Component
{...otherProps}
dangerouslySetInnerHTML={{ __html: error.message }}
/>
);
}
throw error;
}
}
for (let i = 0; i < data.length; i++) {
if (data[i].type === "text") {
fragment.appendChild(document.createTextNode(data[i].data));
} else {
const span = document.createElement("span");
let math = data[i].data;
// Override any display mode defined in the settings with that
// defined by the text itself
optionsCopy.displayMode = data[i].display;
try {
if (optionsCopy.preProcess) {
math = optionsCopy.preProcess(math);
}
katex.render(math, span, optionsCopy);
} catch (e) {
if (!(e instanceof katex.ParseError)) {
throw e;
}
optionsCopy.errorCallback(
"KaTeX auto-render: Failed to parse `" + data[i].data +
"` with ",
e
);
fragment.appendChild(document.createTextNode(data[i].rawData));
continue;
}
fragment.appendChild(span);
}
}
return fragment;
};
static getDerivedStateFromProps(
props: MathComponentProps
): Partial<MathComponentState> {
try {
const { errorColor, renderError } = props
const html = KaTeX.renderToString(props.math, {
displayMode,
errorColor,
throwOnError: !!renderError
})
return { html, error: undefined }
} catch (error) {
if (error instanceof KaTeX.ParseError || error instanceof TypeError) {
return { error }
}
throw error
}
}
}
katex
Fast math typesetting for the web.
GitHub
MIT
Latest version published 2 months ago
Package Health Score
98 / 100
Full package analysis
Popular katex functions
- katex.__parse
- katex.ParseError
- katex.render
- katex.renderToString
- katex/contrib/auto-render/auto-render
- katex/contrib/auto-render/auto-render.js
- katex/dist/contrib/auto-render
- katex/dist/katex.css.toString
- katex/dist/katex.min.js.renderToString
- katex/dist/katex.renderToString
- katex/katex.js.ParseError
- katex/katex.js.renderToString
Similar packages
- mathjax 74 / 100
- latex 42 / 100
- vs 40 / 100
Popular JavaScript code snippets
Find secure code to use in your application or website
- async arrow function
- jquery wait for function to finish
- non-arrow functions are forbidden
- clear function in javascript
- how to pass function as props in react
api documentation for katex (v0.7.1)
![travis-ci.org build-status](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%200%200'%3E%3C/svg%3E)
Fast math typesetting for the web.
package.json
{ "bin": { "katex": "cli.js" }, "bugs": { "url": "https://github.com/Khan/KaTeX/issues" }, "dependencies": { "match-at": "^0.1.0" }, "description": "Fast math typesetting for the web.", "devDependencies": { "browserify": "^10.2.4", "clean-css": "~2.2.15", "eslint": "^1.10.3", "express": "~3.3.3", "glob": "^5.0.15", "jasmine": "^2.3.2", "jasmine-core": "^2.3.4", "js-yaml": "^3.3.1", "jspngopt": "^0.1.0", "less": "~2.7.1", "nomnom": "^1.8.1", "pako": "0.2.7", "selenium-webdriver": "^2.46.1", "sri-toolbox": "^0.2.0", "uglify-js": "~2.4.15" }, "directories": {}, "dist": { "shasum": "06bb5298efad05e1e7228035ba8e1591f3061b8f", "tarball": "https://registry.npmjs.org/katex/-/katex-0.7.1.tgz" }, "files": [ "katex.js", "cli.js", "src/", "dist/" ], "gitHead": "216832464034c13ec812a10f2143464b21a978c1", "homepage": "https://github.com/Khan/KaTeX#readme", "license": "MIT", "main": "katex.js", "maintainers": [ { "name": "gagern", "email": "Martin.vGagern@gmx.net" }, { "name": "kevinbarabash", "email": "kevinb7@gmail.com" }, { "name": "khanacademy", "email": "opensource+npm@khanacademy.org" }, { "name": "spicyj", "email": "ben@benalpert.com" }, { "name": "xymostech", "email": "xymostech@gmail.com" } ], "name": "katex", "optionalDependencies": {}, "readme": "ERROR: No README data found!", "repository": { "type": "git", "url": "git://github.com/Khan/KaTeX.git" }, "scripts": { "prepublish": "make NIS= dist", "start": "node server.js", "test": "make lint test" }, "version": "0.7.1" }
table of contents
module katex
- function katex.Lexer (input)
- function katex.MacroExpander (input, macros)
- function katex.Options (data)
- function katex.ParseError (message, token)
- function katex.Parser (input, settings)
- function katex.__parse (expression, options)
- function katex.render (expression, baseNode, options)
- function katex.renderToString (expression, options)
- object katex.Lexer.prototype
- object katex.MacroExpander.prototype
- object katex.Options.prototype
- object katex.Parser.prototype
- object katex.buildCommon
- object katex.delimiter
- object katex.domTree
- object katex.fontMetrics
- object katex.mathMLTree
- object katex.parseData
- object katex.utils
module katex.Lexer
- function katex.Lexer (input)
module katex.Lexer.prototype
- function katex.Lexer.prototype.lex ()
module katex.MacroExpander
- function katex.MacroExpander (input, macros)
module katex.MacroExpander.prototype
- function katex.MacroExpander.prototype.get (ignoreSpace)
- function katex.MacroExpander.prototype.nextToken ()
- function katex.MacroExpander.prototype.unget (token)
module katex.Options
- function katex.Options (data)
module katex.Options.prototype
- function katex.Options.prototype.extend (extension)
- function katex.Options.prototype.getColor ()
- function katex.Options.prototype.reset ()
- function katex.Options.prototype.withColor (color)
- function katex.Options.prototype.withFont (font)
- function katex.Options.prototype.withPhantom ()
- function katex.Options.prototype.withSize (size)
- function katex.Options.prototype.withStyle (style)
module katex.Parser
- function katex.Parser (input, settings)
module katex.Parser.prototype
- function katex.Parser.prototype.ParseNode (type, value, mode, firstToken, lastToken)
- function katex.Parser.prototype.callFunction (name, args, positions, token)
- function katex.Parser.prototype.consume ()
- function katex.Parser.prototype.expect (text, consume)
- function katex.Parser.prototype.formLigatures (group)
- function katex.Parser.prototype.handleInfixNodes (body)
- function katex.Parser.prototype.handleSupSubscript (name)
- function katex.Parser.prototype.handleUnsupportedCmd ()
- function katex.Parser.prototype.parse ()
- function katex.Parser.prototype.parseArguments (func, funcData)
- function katex.Parser.prototype.parseAtom ()
- function katex.Parser.prototype.parseColorGroup (optional)
- function katex.Parser.prototype.parseExpression (breakOnInfix, breakOnTokenText)
- function katex.Parser.prototype.parseFunction (baseGroup)
- function katex.Parser.prototype.parseGroup (optional)
- function katex.Parser.prototype.parseGroupOfType (innerMode, optional)
- function katex.Parser.prototype.parseImplicitGroup ()
- function katex.Parser.prototype.parseInput ()
- function katex.Parser.prototype.parseRegexGroup (regex, modeName)
- function katex.Parser.prototype.parseSizeGroup (optional)
- function katex.Parser.prototype.parseStringGroup (modeName, optional)
- function katex.Parser.prototype.parseSymbol ()
- function katex.Parser.prototype.switchMode (newMode)
module katex.buildCommon
- function katex.buildCommon.makeFragment (children)
- function katex.buildCommon.makeOrd (group, options, type)
- function katex.buildCommon.makeSpan (classes, children, options)
- function katex.buildCommon.makeSymbol (value, fontFamily, mode, options, classes)
- function katex.buildCommon.makeVList (children, positionType, positionData, options)
- function katex.buildCommon.mathsym (value, mode, options, classes)
- function katex.buildCommon.prependChildren (span, children)
- object katex.buildCommon.fontMap
- object katex.buildCommon.sizingMultiplier
- object katex.buildCommon.spacingFunctions
module katex.delimiter
- function katex.delimiter.customSizedDelim (delim, height, center, options, mode, classes)
- function katex.delimiter.leftRightDelim (delim, height, depth, options, mode, classes)
- function katex.delimiter.sizedDelim (delim, size, options, mode, classes)
module katex.domTree
- function katex.domTree.documentFragment (children)
- function katex.domTree.span (classes, children, options)
- function katex.domTree.symbolNode (value, height, depth, italic, skew, classes, style)
module katex.fontMetrics
- function katex.fontMetrics.getCharacterMetrics (character, style)
- object katex.fontMetrics.metrics
- object katex.fontMetrics.sigmas
module katex.mathMLTree
- function katex.mathMLTree.MathNode (type, children)
- function katex.mathMLTree.TextNode (text)
module katex.parseData
- function katex.parseData.ParseNode (type, value, mode, firstToken, lastToken)
module katex.utils
- function katex.utils.clearNode (node)
- function katex.utils.contains (list, elem)
- function katex.utils.deflt (setting, defaultIfUndefined)
- function katex.utils.escape (text)
- function katex.utils.hyphenate (str)
- function katex.utils.indexOf (list, elem)
module katex
function katex.Lexer (input)
- description and source-code
function Lexer(input) { this.input = input; this.pos = 0; }
- example usage
function katex.MacroExpander (input, macros)
- description and source-code
function MacroExpander(input, macros) { this.lexer = new Lexer(input); this.macros = macros; this.stack = []; // contains tokens in REVERSE order this.discardedWhiteSpace = []; }
- example usage
function katex.Options (data)
- description and source-code
function Options(data) { this.style = data.style; this.color = data.color; this.size = data.size; this.phantom = data.phantom; this.font = data.font; if (data.parentStyle === undefined) { this.parentStyle = data.style; } else { this.parentStyle = data.parentStyle; } if (data.parentSize === undefined) { this.parentSize = data.size; } else { this.parentSize = data.parentSize; } }
- example usage
function katex.ParseError (message, token)
- description and source-code
function ParseError(message, token) { var error = "KaTeX parse error: " + message; var start; var end; if (token && token.lexer && token.start <= token.end) { // If we have the input and a position, make the error a bit fancier // Get the input var input = token.lexer.input; // Prepend some information start = token.start; end = token.end; if (start === input.length) { error += " at end of input: "; } else { error += " at position " + (start + 1) + ": "; } // Underline token in question using combining underscores var underlined = input.slice(start, end).replace(/[^]/g, "$&u0332"); // Extract some context from the input and add it to the error var left; if (start > 15) { left = "…" + input.slice(start - 15, start); } else { left = input.slice(0, start); } var right; if (end + 15 < input.length) { right = input.slice(end, end + 15) + "…"; } else { right = input.slice(end); } error += left + underlined + right; } // Some hackery to make ParseError a prototype of Error // See http://stackoverflow.com/a/8460753 var self = new Error(error); self.name = "ParseError"; self.__proto__ = ParseError.prototype; self.position = start; return self; }
- example usage
function katex.Parser (input, settings)
- description and source-code
function Parser(input, settings) { // Create a new macro expander (gullet) and (indirectly via that) also a // new lexer (mouth) for this parser (stomach, in the language of TeX) this.gullet = new MacroExpander(input, settings.macros); // Store the settings for use in parsing this.settings = settings; // Count leftright depth (for middle errors) this.leftrightDepth = 0; }
- example usage
function katex.__parse (expression, options)
- description and source-code
__parse = function (expression, options) { var settings = new Settings(options); return parseTree(expression, settings); }
- example usage
function katex.render (expression, baseNode, options)
- description and source-code
render = function (expression, baseNode, options) { utils.clearNode(baseNode); var settings = new Settings(options); var tree = parseTree(expression, settings); var node = buildTree(tree, expression, settings).toNode(); baseNode.appendChild(node); }
- example usage
... ''' #### In-browser rendering Call 'katex.render' with a TeX expression and a DOM element to render into: '''js katex.render("c = \pm\sqrt{a^2 + b^2}", element); ''' If KaTeX can't parse the expression, it throws a 'katex.ParseError' error. #### Server side rendering or rendering to a string To generate HTML on the server or to generate an HTML string of the rendered math, you can use 'katex.renderToString': ...
function katex.renderToString (expression, options)
- description and source-code
renderToString = function (expression, options) { var settings = new Settings(options); var tree = parseTree(expression, settings); return buildTree(tree, expression, settings).toMarkup(); }
- example usage
... If KaTeX can't parse the expression, it throws a 'katex.ParseError' error. #### Server side rendering or rendering to a string To generate HTML on the server or to generate an HTML string of the rendered math, you can use 'katex.renderToString': '''js var html = katex.renderToString("c = \pm\sqrt{a^2 + b^2}"); // '<span class="katex">...</span>' ''' Make sure to include the CSS and font files, but there is no need to include the JavaScript. Like 'render', 'renderToString' throws if it can't parse the expression. #### Rendering options ...
module katex.Lexer
function katex.Lexer (input)
- description and source-code
function Lexer(input) { this.input = input; this.pos = 0; }
- example usage
module katex.Lexer.prototype
function katex.Lexer.prototype.lex ()
- description and source-code
lex = function () { var input = this.input; var pos = this.pos; if (pos === input.length) { return new Token("EOF", pos, pos, this); } var match = matchAt(tokenRegex, input, pos); if (match === null) { throw new ParseError( "Unexpected character: '" + input[pos] + "'", new Token(input[pos], pos, pos + 1, this)); } var text = match[2] || " "; var start = this.pos; this.pos += match[0].length; var end = this.pos; return new Token(text, start, end, this); }
- example usage
... /** * Recursively expand first token, then return first non-expandable token. */ MacroExpander.prototype.nextToken = function() { for (;;) { if (this.stack.length === 0) { this.stack.push(this.lexer.lex()); } var topToken = this.stack.pop(); var name = topToken.text; if (!(name.charAt(0) === "\" && this.macros.hasOwnProperty(name))) { return topToken; } var expansion = this.macros[name]; ...
module katex.MacroExpander
function katex.MacroExpander (input, macros)
- description and source-code
function MacroExpander(input, macros) { this.lexer = new Lexer(input); this.macros = macros; this.stack = []; // contains tokens in REVERSE order this.discardedWhiteSpace = []; }
- example usage
module katex.MacroExpander.prototype
function katex.MacroExpander.prototype.get (ignoreSpace)
- description and source-code
get = function (ignoreSpace) { this.discardedWhiteSpace = []; var token = this.nextToken(); if (ignoreSpace) { while (token.text === " ") { this.discardedWhiteSpace.push(token); token = this.nextToken(); } } return token; }
- example usage
... }; /** * Considers the current look ahead token as consumed, * and fetches the one after that as the new look ahead. */ Parser.prototype.consume = function() { this.nextToken = this.gullet.get(this.mode === "math"); }; Parser.prototype.switchMode = function(newMode) { this.gullet.unget(this.nextToken); this.mode = newMode; this.consume(); }; ...
function katex.MacroExpander.prototype.nextToken ()
- description and source-code
nextToken = function () { for (;;) { if (this.stack.length === 0) { this.stack.push(this.lexer.lex()); } var topToken = this.stack.pop(); var name = topToken.text; if (!(name.charAt(0) === "\" && this.macros.hasOwnProperty(name))) { return topToken; } var expansion = this.macros[name]; if (typeof expansion === "string") { var bodyLexer = new Lexer(expansion); expansion = []; var tok = bodyLexer.lex(); while (tok.text !== "EOF") { expansion.push(tok); tok = bodyLexer.lex(); } expansion.reverse(); // to fit in with stack using push and pop this.macros[name] = expansion; } this.stack = this.stack.concat(expansion); } }
- example usage
... } this.stack = this.stack.concat(expansion); } }; MacroExpander.prototype.get = function(ignoreSpace) { this.discardedWhiteSpace = []; var token = this.nextToken(); if (ignoreSpace) { while (token.text === " ") { this.discardedWhiteSpace.push(token); token = this.nextToken(); } } return token; ...
function katex.MacroExpander.prototype.unget (token)
- description and source-code
unget = function (token) { this.stack.push(token); while (this.discardedWhiteSpace.length !== 0) { this.stack.push(this.discardedWhiteSpace.pop()); } }
- example usage
... * and fetches the one after that as the new look ahead. */ Parser.prototype.consume = function() { this.nextToken = this.gullet.get(this.mode === "math"); }; Parser.prototype.switchMode = function(newMode) { this.gullet.unget(this.nextToken); this.mode = newMode; this.consume(); }; /** * Main parsing function, which parses an entire input. * ...
module katex.Options
function katex.Options (data)
- description and source-code
function Options(data) { this.style = data.style; this.color = data.color; this.size = data.size; this.phantom = data.phantom; this.font = data.font; if (data.parentStyle === undefined) { this.parentStyle = data.style; } else { this.parentStyle = data.parentStyle; } if (data.parentSize === undefined) { this.parentSize = data.size; } else { this.parentSize = data.parentSize; } }
- example usage
module katex.Options.prototype
function katex.Options.prototype.extend (extension)
- description and source-code
extend = function (extension) { var data = { style: this.style, size: this.size, color: this.color, parentStyle: this.style, parentSize: this.size, phantom: this.phantom, font: this.font }; for (var key in extension) { if (extension.hasOwnProperty(key)) { data[key] = extension[key]; } } return new Options(data); }
- example usage
... return new Options(data); }; /** * Create a new options object with the given style. */ Options.prototype.withStyle = function(style) { return this.extend({ style: style }); }; /** * Create a new options object with the given size. */ ...
function katex.Options.prototype.getColor ()
- description and source-code
getColor = function () { if (this.phantom) { return "transparent"; } else { return colorMap[this.color] || this.color; } }
- example usage
... symbolNode = new domTree.symbolNode(value, 0, 0, 0, 0, classes); } if (options) { if (options.style.isTight()) { symbolNode.classes.push("mtight"); } if (options.getColor()) { symbolNode.style.color = options.getColor(); } } return symbolNode; }; ...
function katex.Options.prototype.reset ()
- description and source-code
reset = function () { return this.extend({}); }
- example usage
... baseElem.type === "close" || baseElem.type === "punct"; }; var makeNullDelimiter = function(options, classes) { return makeSpan(classes.concat([ "sizing", "reset-" + options.size, "size5", options.style.reset(), Style.TEXT.cls(), "nulldelimiter"])); }; /** * This is a map of group types to the function used to handle that type. * Simpler types come at the beginning, while complicated types come afterwards. */ ...
function katex.Options.prototype.withColor (color)
- description and source-code
withColor = function (color) { return this.extend({ color: color }); }
- example usage
... return makeSpan(["mord", "text", newOptions.style.cls()], inner, newOptions); }; groupTypes.color = function(group, options) { var elements = buildExpression( group.value.value, options.withColor(group.value.color), false ); // color isn't supposed to affect the type of the elements it contains. // To accomplish this, we wrap the results in a fragment, so the inner // elements will be able to directly interact with their neighbors. For // example, 'color{red}{2 +} 3' has the same spacing as '2 + 3' ...
function katex.Options.prototype.withFont (font)
- description and source-code
withFont = function (font) { return this.extend({ font: font || this.font }); }
- example usage
... ["mord", options.style.cls()], buildExpression(group.value, options.reset(), true), options ); }; groupTypes.text = function(group, options) { var newOptions = options.withFont(group.value.style); var inner = buildExpression(group.value.body, newOptions, true); for (var i = 0; i < inner.length - 1; i++) { if (inner[i].tryCombine(inner[i + 1])) { inner.splice(i + 1, 1); i--; } } ...
function katex.Options.prototype.withPhantom ()
- description and source-code
withPhantom = function () { return this.extend({ phantom: true }); }
- example usage
... return accentWrap; } }; groupTypes.phantom = function(group, options) { var elements = buildExpression( group.value.value, options.withPhantom(), false ); // phantom isn't supposed to affect the elements it contains. // See "color" for more details. return new buildCommon.makeFragment(elements); }; ...
function katex.Options.prototype.withSize (size)
- description and source-code
withSize = function (size) { return this.extend({ size: size }); }
- example usage
... }; groupTypes.sizing = function(group, options) { // Handle sizing operators like Huge. Real TeX doesn't actually allow // these functions inside of math expressions, so we do some special // handling. var inner = buildExpression(group.value.value, options.withSize(group.value.size), false); // Compute the correct maxFontSize. var style = options.style; var fontSize = buildCommon.sizingMultiplier[group.value.size]; fontSize = fontSize * style.sizeMultiplier; // Add size-resetting classes to the inner list and set maxFontSize ...
function katex.Options.prototype.withStyle (style)
- description and source-code
withStyle = function (style) { return this.extend({ style: style }); }
- example usage
... var sup; var sub; var style = options.style; var newOptions; if (group.value.sup) { newOptions = options.withStyle(style.sup()); sup = buildGroup(group.value.sup, newOptions); supmid = makeSpan([style.reset(), style.sup().cls()], [sup], newOptions); } if (group.value.sub) { newOptions = options.withStyle(style.sub()); ...
module katex.Parser
function katex.Parser (input, settings)
- description and source-code
function Parser(input, settings) { // Create a new macro expander (gullet) and (indirectly via that) also a // new lexer (mouth) for this parser (stomach, in the language of TeX) this.gullet = new MacroExpander(input, settings.macros); // Store the settings for use in parsing this.settings = settings; // Count leftright depth (for middle errors) this.leftrightDepth = 0; }
- example usage
module katex.Parser.prototype
function katex.Parser.prototype.ParseNode (type, value, mode, firstToken, lastToken)
- description and source-code
function ParseNode(type, value, mode, firstToken, lastToken) { this.type = type; this.value = value; this.mode = mode; if (firstToken && (!lastToken || lastToken.lexer === firstToken.lexer)) { this.lexer = firstToken.lexer; this.start = firstToken.start; this.end = (lastToken || firstToken).end; } }
- example usage
function katex.Parser.prototype.callFunction (name, args, positions, token)
- description and source-code
callFunction = function (name, args, positions, token) { var context = { funcName: name, parser: this, positions: positions, token: token }; return functions[name].handler(context, args); }
- example usage
... if (denomBody.length === 1 && denomBody[0].type === "ordgroup") { denomNode = denomBody[0]; } else { denomNode = new ParseNode("ordgroup", denomBody, this.mode); } var value = this.callFunction( funcName, [numerNode, denomNode], null); return [new ParseNode(value.type, value, this.mode)]; } else { return body; } }; ...
function katex.Parser.prototype.consume ()
- description and source-code
consume = function () { this.nextToken = this.gullet.get(this.mode === "math"); }
- example usage
... if (this.nextToken.text !== text) { throw new ParseError( "Expected '" + text + "', got '" + this.nextToken.text + "'", this.nextToken ); } if (consume !== false) { this.consume(); } }; /** * Considers the current look ahead token as consumed, * and fetches the one after that as the new look ahead. */ ...
function katex.Parser.prototype.expect (text, consume)
- description and source-code
expect = function (text, consume) { if (this.nextToken.text !== text) { throw new ParseError( "Expected '" + text + "', got '" + this.nextToken.text + "'", this.nextToken ); } if (consume !== false) { this.consume(); } }
- example usage
... /** * Parses an entire input tree. */ Parser.prototype.parseInput = function() { // Parse an expression var expression = this.parseExpression(false); // If we succeeded, make sure there's an EOF at the end this.expect("EOF", false); return expression; }; var endOfExpression = ["}", "\end", "\right", "&", "\\", "\cr"]; /** * Parses an "expression", which is a list of atoms. ...
function katex.Parser.prototype.formLigatures (group)
- description and source-code
formLigatures = function (group) { var i; var n = group.length - 1; for (i = 0; i < n; ++i) { var a = group[i]; var v = a.value; if (v === "-" && group[i + 1].value === "-") { if (i + 1 < n && group[i + 2].value === "-") { group.splice(i, 3, new ParseNode( "textord", "---", "text", a, group[i + 2])); n -= 2; } else { group.splice(i, 2, new ParseNode( "textord", "--", "text", a, group[i + 1])); n -= 1; } } if ((v === "'" || v === "'") && group[i + 1].value === v) { group.splice(i, 2, new ParseNode( "textord", v + v, "text", a, group[i + 1])); n -= 1; } } }
- example usage
... // If we get a brace, parse an expression this.consume(); var expression = this.parseExpression(false, optional ? "]" : null); var lastToken = this.nextToken; // Make sure we get a close brace this.expect(optional ? "]" : "}"); if (this.mode === "text") { this.formLigatures(expression); } return new ParseFuncOrArgument( new ParseNode("ordgroup", expression, this.mode, firstToken, lastToken), false); } else { // Otherwise, just return a nucleus, or nothing for an optional group ...
function katex.Parser.prototype.handleInfixNodes (body)
- description and source-code
handleInfixNodes = function (body) { var overIndex = -1; var funcName; for (var i = 0; i < body.length; i++) { var node = body[i]; if (node.type === "infix") { if (overIndex !== -1) { throw new ParseError( "only one infix operator per group", node.value.token); } overIndex = i; funcName = node.value.replaceWith; } } if (overIndex !== -1) { var numerNode; var denomNode; var numerBody = body.slice(0, overIndex); var denomBody = body.slice(overIndex + 1); if (numerBody.length === 1 && numerBody[0].type === "ordgroup") { numerNode = numerBody[0]; } else { numerNode = new ParseNode("ordgroup", numerBody, this.mode); } if (denomBody.length === 1 && denomBody[0].type === "ordgroup") { denomNode = denomBody[0]; } else { denomNode = new ParseNode("ordgroup", denomBody, this.mode); } var value = this.callFunction( funcName, [numerNode, denomNode], null); return [new ParseNode(value.type, value, this.mode)]; } else { return body; } }
- example usage
... continue; } break; } body.push(atom); } return this.handleInfixNodes(body); }; /** * Rewrites infix operators such as over with corresponding commands such * as frac. * * There can only be one infix operator per group. If there's more than one ...
function katex.Parser.prototype.handleSupSubscript (name)
- description and source-code
handleSupSubscript = function (name) { var symbolToken = this.nextToken; var symbol = symbolToken.text; this.consume(); var group = this.parseGroup(); if (!group) { if (!this.settings.throwOnError && this.nextToken.text[0] === "\") { return this.handleUnsupportedCmd(); } else { throw new ParseError( "Expected group after '" + symbol + "'", symbolToken ); } } else if (group.isFunction) { // ^ and _ have a greediness, so handle interactions with functions' // greediness var funcGreediness = functions[group.result].greediness; if (funcGreediness > SUPSUB_GREEDINESS) { return this.parseFunction(group); } else { throw new ParseError( "Got function '" + group.result + "' with no arguments " + "as " + name, symbolToken); } } else { return group.result; } }
- example usage
... } this.consume(); } else if (lex.text === "^") { // We got a superscript start if (superscript) { throw new ParseError("Double superscript", lex); } superscript = this.handleSupSubscript("superscript"); } else if (lex.text === "_") { // We got a subscript start if (subscript) { throw new ParseError("Double subscript", lex); } subscript = this.handleSupSubscript("subscript"); } else if (lex.text === "'") { ...
function katex.Parser.prototype.handleUnsupportedCmd ()
- description and source-code
handleUnsupportedCmd = function () { var text = this.nextToken.text; var textordArray = []; for (var i = 0; i < text.length; i++) { textordArray.push(new ParseNode("textord", text[i], "text")); } var textNode = new ParseNode( "text", { body: textordArray, type: "text" }, this.mode); var colorNode = new ParseNode( "color", { color: this.settings.errorColor, value: [textNode], type: "color" }, this.mode); this.consume(); return colorNode; }
- example usage
... } if (breakOnInfix && functions[lex.text] && functions[lex.text].infix) { break; } var atom = this.parseAtom(); if (!atom) { if (!this.settings.throwOnError && lex.text[0] === "\") { var errorNode = this.handleUnsupportedCmd(); body.push(errorNode); continue; } break; } body.push(atom); ...
function katex.Parser.prototype.parse ()
- description and source-code
parse = function () { // Try to parse the input this.mode = "math"; this.consume(); var parse = this.parseInput(); return parse; }
- example usage
... /** * Take an entire parse tree, and build it into an appropriate set of HTML * nodes. */ var buildHTML = function(tree, options) { // buildExpression is destructive, so we need to make a clone // of the incoming tree so that it isn't accidentally changed tree = JSON.parse(JSON.stringify(tree)); // Build the expression contained in the tree var expression = buildExpression(tree, options, true); var body = makeSpan(["base", options.style.cls()], expression, options); // Add struts, which ensure that the top of the HTML element falls at the // height of the expression, and the bottom of the HTML element falls at the ...
function katex.Parser.prototype.parseArguments (func, funcData)
- description and source-code
parseArguments = function (func, funcData) { var totalArgs = funcData.numArgs + funcData.numOptionalArgs; if (totalArgs === 0) { return [[this.pos]]; } var baseGreediness = funcData.greediness; var positions = [this.pos]; var args = []; for (var i = 0; i < totalArgs; i++) { var nextToken = this.nextToken; var argType = funcData.argTypes && funcData.argTypes[i]; var arg; if (i < funcData.numOptionalArgs) { if (argType) { arg = this.parseGroupOfType(argType, true); } else { arg = this.parseGroup(true); } if (!arg) { args.push(null); positions.push(this.pos); continue; } } else { if (argType) { arg = this.parseGroupOfType(argType); } else { arg = this.parseGroup(); } if (!arg) { if (!this.settings.throwOnError && this.nextToken.text[0] === "\") { arg = new ParseFuncOrArgument( this.handleUnsupportedCmd(this.nextToken.text), false); } else { throw new ParseError( "Expected group after '" + func + "'", nextToken); } } } var argNode; if (arg.isFunction) { var argGreediness = functions[arg.result].greediness; if (argGreediness > baseGreediness) { argNode = this.parseFunction(arg); } else { throw new ParseError( "Got function '" + arg.result + "' as " + "argument to '" + func + "'", nextToken); } } else { argNode = arg.result; } args.push(argNode); positions.push(this.pos); } args.push(positions); return args; }
- example usage
... if (!environments.hasOwnProperty(envName)) { throw new ParseError( "No such environment: " + envName, begin.value.nameGroup); } // Build the environment object. Arguments and other information will // be made available to the begin and end methods using properties. var env = environments[envName]; var args = this.parseArguments("\begin{" + envName + "}", env); var context = { mode: this.mode, envName: envName, parser: this, positions: args.pop() }; var result = env.handler(context, args); ...
function katex.Parser.prototype.parseAtom ()
- description and source-code
parseAtom = function () { // The body of an atom is an implicit group, so that things like // left(xright)^2 work correctly. var base = this.parseImplicitGroup(); // In text mode, we don't have superscripts or subscripts if (this.mode === "text") { return base; } // Note that base may be empty (i.e. null) at this point. var superscript; var subscript; while (true) { // Lex the first token var lex = this.nextToken; if (lex.text === "\limits" || lex.text === "\nolimits") { // We got a limit control if (!base || base.type !== "op") { throw new ParseError( "Limit controls must follow a math operator", lex); } else { var limits = lex.text === "\limits"; base.value.limits = limits; base.value.alwaysHandleSupSub = true; } this.consume(); } else if (lex.text === "^") { // We got a superscript start if (superscript) { throw new ParseError("Double superscript", lex); } superscript = this.handleSupSubscript("superscript"); } else if (lex.text === "_") { // We got a subscript start if (subscript) { throw new ParseError("Double subscript", lex); } subscript = this.handleSupSubscript("subscript"); } else if (lex.text === "'") { // We got a prime var prime = new ParseNode("textord", "\prime", this.mode); // Many primes can be grouped together, so we handle this here var primes = [prime]; this.consume(); // Keep lexing tokens until we get something that's not a prime while (this.nextToken.text === "'") { // For each one, add another prime to the list primes.push(prime); this.consume(); } // Put them into an ordgroup as the superscript superscript = new ParseNode("ordgroup", primes, this.mode); } else { // If it wasn't ^, _, or ', stop parsing super/subscripts break; } } if (superscript || subscript) { // If we got either a superscript or subscript, create a supsub return new ParseNode("supsub", { base: base, sup: superscript, sub: subscript }, this.mode); } else { // Otherwise return the original body return base; } }
- example usage
... } if (breakOnTokenText && lex.text === breakOnTokenText) { break; } if (breakOnInfix && functions[lex.text] && functions[lex.text].infix) { break; } var atom = this.parseAtom(); if (!atom) { if (!this.settings.throwOnError && lex.text[0] === "\") { var errorNode = this.handleUnsupportedCmd(); body.push(errorNode); continue; } ...
function katex.Parser.prototype.parseColorGroup (optional)
- description and source-code
parseColorGroup = function (optional) { var res = this.parseStringGroup("color", optional); if (!res) { return null; } var match = (/^(#[a-z0-9]+|[a-z]+)$/i).exec(res.text); if (!match) { throw new ParseError("Invalid color: '" + res.text + "'", res); } return new ParseFuncOrArgument( new ParseNode("color", match[0], this.mode), false); }
- example usage
... var outerMode = this.mode; // Handle 'original' argTypes if (innerMode === "original") { innerMode = outerMode; } if (innerMode === "color") { return this.parseColorGroup(optional); } if (innerMode === "size") { return this.parseSizeGroup(optional); } this.switchMode(innerMode); if (innerMode === "text") { ...
function katex.Parser.prototype.parseExpression (breakOnInfix, breakOnTokenText)
- description and source-code
parseExpression = function (breakOnInfix, breakOnTokenText) { var body = []; // Keep adding atoms to the body until we can't parse any more atoms (either // we reached the end, a }, or a right) while (true) { var lex = this.nextToken; if (endOfExpression.indexOf(lex.text) !== -1) { break; } if (breakOnTokenText && lex.text === breakOnTokenText) { break; } if (breakOnInfix && functions[lex.text] && functions[lex.text].infix) { break; } var atom = this.parseAtom(); if (!atom) { if (!this.settings.throwOnError && lex.text[0] === "\") { var errorNode = this.handleUnsupportedCmd(); body.push(errorNode); continue; } break; } body.push(atom); } return this.handleInfixNodes(body); }
- example usage
... }; /** * Parses an entire input tree. */ Parser.prototype.parseInput = function() { // Parse an expression var expression = this.parseExpression(false); // If we succeeded, make sure there's an EOF at the end this.expect("EOF", false); return expression; }; var endOfExpression = ["}", "\end", "\right", "&", "\\", "\cr"]; ...
function katex.Parser.prototype.parseFunction (baseGroup)
- description and source-code
parseFunction = function (baseGroup) { if (!baseGroup) { baseGroup = this.parseGroup(); } if (baseGroup) { if (baseGroup.isFunction) { var func = baseGroup.result; var funcData = functions[func]; if (this.mode === "text" && !funcData.allowedInText) { throw new ParseError( "Can't use function '" + func + "' in text mode", baseGroup.token); } var args = this.parseArguments(func, funcData); var token = baseGroup.token; var result = this.callFunction(func, args, args.pop(), token); return new ParseNode(result.type, result, this.mode); } else { return baseGroup.result; } } else { return null; } }
- example usage
... ); } } else if (group.isFunction) { // ^ and _ have a greediness, so handle interactions with functions' // greediness var funcGreediness = functions[group.result].greediness; if (funcGreediness > SUPSUB_GREEDINESS) { return this.parseFunction(group); } else { throw new ParseError( "Got function '" + group.result + "' with no arguments " + "as " + name, symbolToken); } } else { return group.result; ...
function katex.Parser.prototype.parseGroup (optional)
- description and source-code
parseGroup = function (optional) { var firstToken = this.nextToken; // Try to parse an open brace if (this.nextToken.text === (optional ? "[" : "{")) { // If we get a brace, parse an expression this.consume(); var expression = this.parseExpression(false, optional ? "]" : null); var lastToken = this.nextToken; // Make sure we get a close brace this.expect(optional ? "]" : "}"); if (this.mode === "text") { this.formLigatures(expression); } return new ParseFuncOrArgument( new ParseNode("ordgroup", expression, this.mode, firstToken, lastToken), false); } else { // Otherwise, just return a nucleus, or nothing for an optional group return optional ? null : this.parseSymbol(); } }
- example usage
... /** * Handle a subscript or superscript with nice errors. */ Parser.prototype.handleSupSubscript = function(name) { var symbolToken = this.nextToken; var symbol = symbolToken.text; this.consume(); var group = this.parseGroup(); if (!group) { if (!this.settings.throwOnError && this.nextToken.text[0] === "\") { return this.handleUnsupportedCmd(); } else { throw new ParseError( "Expected group after '" + symbol + "'", ...
function katex.Parser.prototype.parseGroupOfType (innerMode, optional)
- description and source-code
parseGroupOfType = function (innerMode, optional) { var outerMode = this.mode; // Handle 'original' argTypes if (innerMode === "original") { innerMode = outerMode; } if (innerMode === "color") { return this.parseColorGroup(optional); } if (innerMode === "size") { return this.parseSizeGroup(optional); } this.switchMode(innerMode); if (innerMode === "text") { // text mode is special because it should ignore the whitespace before // it while (this.nextToken.text === " ") { this.consume(); } } // By the time we get here, innerMode is one of "text" or "math". // We switch the mode of the parser, recurse, then restore the old mode. var res = this.parseGroup(optional); this.switchMode(outerMode); return res; }
- example usage
... for (var i = 0; i < totalArgs; i++) { var nextToken = this.nextToken; var argType = funcData.argTypes && funcData.argTypes[i]; var arg; if (i < funcData.numOptionalArgs) { if (argType) { arg = this.parseGroupOfType(argType, true); } else { arg = this.parseGroup(true); } if (!arg) { args.push(null); positions.push(this.pos); continue; ...
function katex.Parser.prototype.parseImplicitGroup ()
- description and source-code
parseImplicitGroup = function () { var start = this.parseSymbol(); if (start == null) { // If we didn't get anything we handle, fall back to parseFunction return this.parseFunction(); } var func = start.result; var body; if (func === "\left") { // If we see a left: // Parse the entire left function (including the delimiter) var left = this.parseFunction(start); // Parse out the implicit body ++this.leftrightDepth; body = this.parseExpression(false); --this.leftrightDepth; // Check the next token this.expect("\right", false); var right = this.parseFunction(); return new ParseNode("leftright", { body: body, left: left.value.value, right: right.value.value }, this.mode); } else if (func === "\begin") { // begin...end is similar to left...right var begin = this.parseFunction(start); var envName = begin.value.name; if (!environments.hasOwnProperty(envName)) { throw new ParseError( "No such environment: " + envName, begin.value.nameGroup); } // Build the environment object. Arguments and other information will // be made available to the begin and end methods using properties. var env = environments[envName]; var args = this.parseArguments("\begin{" + envName + "}", env); var context = { mode: this.mode, envName: envName, parser: this, positions: args.pop() }; var result = env.handler(context, args); this.expect("\end", false); var endNameToken = this.nextToken; var end = this.parseFunction(); if (end.value.name !== envName) { throw new ParseError( "Mismatch: \begin{" + envName + "} matched " + "by \end{" + end.value.name + "}", endNameToken); } result.position = end.position; return result; } else if (utils.contains(sizeFuncs, func)) { // If we see a sizing function, parse out the implict body body = this.parseExpression(false); return new ParseNode("sizing", { // Figure out what size to use based on the list of functions above size: "size" + (utils.indexOf(sizeFuncs, func) + 1), value: body }, this.mode); } else if (utils.contains(styleFuncs, func)) { // If we see a styling function, parse out the implict body body = this.parseExpression(true); return new ParseNode("styling", { // Figure out what style to use by pulling out the style from // the function name style: func.slice(1, func.length - 5), value: body }, this.mode); } else { // Defer to parseFunction if it's not a function we handle return this.parseFunction(start); } }
- example usage
... * Parses a group with optional super/subscripts. * * @return {?ParseNode} */ Parser.prototype.parseAtom = function() { // The body of an atom is an implicit group, so that things like // left(xright)^2 work correctly. var base = this.parseImplicitGroup(); // In text mode, we don't have superscripts or subscripts if (this.mode === "text") { return base; } // Note that base may be empty (i.e. null) at this point. ...
function katex.Parser.prototype.parseInput ()
- description and source-code
parseInput = function () { // Parse an expression var expression = this.parseExpression(false); // If we succeeded, make sure there's an EOF at the end this.expect("EOF", false); return expression; }
- example usage
... * * @return {?Array.<ParseNode>} */ Parser.prototype.parse = function() { // Try to parse the input this.mode = "math"; this.consume(); var parse = this.parseInput(); return parse; }; /** * Parses an entire input tree. */ Parser.prototype.parseInput = function() { ...
function katex.Parser.prototype.parseRegexGroup (regex, modeName)
- description and source-code
parseRegexGroup = function (regex, modeName) { var outerMode = this.mode; this.mode = "text"; var firstToken = this.nextToken; var lastToken = firstToken; var str = ""; while (this.nextToken.text !== "EOF" && regex.test(str + this.nextToken.text)) { lastToken = this.nextToken; str += lastToken.text; this.consume(); } if (str === "") { throw new ParseError( "Invalid " + modeName + ": '" + firstToken.text + "'", firstToken); } this.mode = outerMode; return firstToken.range(lastToken, str); }
- example usage
... /** * Parses a size specification, consisting of magnitude and unit. */ Parser.prototype.parseSizeGroup = function(optional) { var res; if (!optional && this.nextToken.text !== "{") { res = this.parseRegexGroup( /^[-+]? *(?:$|d+|d+.d*|.d*) *[a-z]{0,2}$/, "size"); } else { res = this.parseStringGroup("size", optional); } if (!res) { return null; } ...
function katex.Parser.prototype.parseSizeGroup (optional)
- description and source-code
parseSizeGroup = function (optional) { var res; if (!optional && this.nextToken.text !== "{") { res = this.parseRegexGroup( /^[-+]? *(?:$|d+|d+.d*|.d*) *[a-z]{0,2}$/, "size"); } else { res = this.parseStringGroup("size", optional); } if (!res) { return null; } var match = (/([-+]?) *(d+(?:.d*)?|.d+) *([a-z]{2})/).exec(res.text); if (!match) { throw new ParseError("Invalid size: '" + res.text + "'", res); } var data = { number: +(match[1] + match[2]), // sign + magnitude, cast to number unit: match[3] }; if (data.unit !== "em" && data.unit !== "ex" && data.unit !== "mu") { throw new ParseError("Invalid unit: '" + data.unit + "'", res); } return new ParseFuncOrArgument( new ParseNode("color", data, this.mode), false); }
- example usage
... innerMode = outerMode; } if (innerMode === "color") { return this.parseColorGroup(optional); } if (innerMode === "size") { return this.parseSizeGroup(optional); } this.switchMode(innerMode); if (innerMode === "text") { // text mode is special because it should ignore the whitespace before // it while (this.nextToken.text === " ") { ...
function katex.Parser.prototype.parseStringGroup (modeName, optional)
- description and source-code
parseStringGroup = function (modeName, optional) { if (optional && this.nextToken.text !== "[") { return null; } var outerMode = this.mode; this.mode = "text"; this.expect(optional ? "[" : "{"); var str = ""; var firstToken = this.nextToken; var lastToken = firstToken; while (this.nextToken.text !== (optional ? "]" : "}")) { if (this.nextToken.text === "EOF") { throw new ParseError( "Unexpected end of input in " + modeName, firstToken.range(this.nextToken, str)); } lastToken = this.nextToken; str += lastToken.text; this.consume(); } this.mode = outerMode; this.expect(optional ? "]" : "}"); return firstToken.range(lastToken, str); }
- example usage
... return firstToken.range(lastToken, str); }; /** * Parses a color description. */ Parser.prototype.parseColorGroup = function(optional) { var res = this.parseStringGroup("color", optional); if (!res) { return null; } var match = (/^(#[a-z0-9]+|[a-z]+)$/i).exec(res.text); if (!match) { throw new ParseError("Invalid color: '" + res.text + "'", res); } ...
function katex.Parser.prototype.parseSymbol ()
- description and source-code
parseSymbol = function () { var nucleus = this.nextToken; if (functions[nucleus.text]) { this.consume(); // If there exists a function with this name, we return the function and // say that it is a function. return new ParseFuncOrArgument( nucleus.text, true, nucleus); } else if (symbols[this.mode][nucleus.text]) { this.consume(); // Otherwise if this is a no-argument function, find the type it // corresponds to in the symbols map return new ParseFuncOrArgument( new ParseNode(symbols[this.mode][nucleus.text].group, nucleus.text, this.mode, nucleus), false, nucleus); } else if (this.mode === "text" && cjkRegex.test(nucleus.text)) { this.consume(); return new ParseFuncOrArgument( new ParseNode("textord", nucleus.text, this.mode, nucleus), false, nucleus); } else { return null; } }
- example usage
... * implicit grouping after it until the end of the group. E.g. * small text {Large large text} small text again * It is also used for left and right to get the correct grouping. * * @return {?ParseNode} */ Parser.prototype.parseImplicitGroup = function() { var start = this.parseSymbol(); if (start == null) { // If we didn't get anything we handle, fall back to parseFunction return this.parseFunction(); } var func = start.result; ...
function katex.Parser.prototype.switchMode (newMode)
- description and source-code
switchMode = function (newMode) { this.gullet.unget(this.nextToken); this.mode = newMode; this.consume(); }
- example usage
... if (innerMode === "color") { return this.parseColorGroup(optional); } if (innerMode === "size") { return this.parseSizeGroup(optional); } this.switchMode(innerMode); if (innerMode === "text") { // text mode is special because it should ignore the whitespace before // it while (this.nextToken.text === " ") { this.consume(); } } ...
module katex.buildCommon
function katex.buildCommon.makeFragment (children)
- description and source-code
makeFragment = function (children) { var fragment = new domTree.documentFragment(children); sizeElementFromChildren(fragment); return fragment; }
- example usage
... false ); // color isn't supposed to affect the type of the elements it contains. // To accomplish this, we wrap the results in a fragment, so the inner // elements will be able to directly interact with their neighbors. For // example, 'color{red}{2 +} 3' has the same spacing as '2 + 3' return new buildCommon.makeFragment(elements); }; groupTypes.supsub = function(group, options) { // Superscript and subscripts are handled in the TeXbook on page // 445-446, rules 18(a-f). // Here is where we defer to the inner group if it should handle ...
function katex.buildCommon.makeOrd (group, options, type)
- description and source-code
makeOrd = function (group, options, type) { var mode = group.mode; var value = group.value; if (symbols[mode][value] && symbols[mode][value].replace) { value = symbols[mode][value].replace; } var classes = ["mord"]; var font = options.font; if (font) { if (font === "mathit" || utils.contains(mainitLetters, value)) { return mathit(value, mode, options, classes); } else { var fontName = fontMap[font].fontName; if (fontMetrics.getCharacterMetrics(value, fontName)) { return makeSymbol( value, fontName, mode, options, classes.concat([font])); } else { return mathDefault(value, mode, options, classes, type); } } } else { return mathDefault(value, mode, options, classes, type); } }
- example usage
... /** * This is a map of group types to the function used to handle that type. * Simpler types come at the beginning, while complicated types come afterwards. */ var groupTypes = {}; groupTypes.mathord = function(group, options) { return buildCommon.makeOrd(group, options, "mathord"); }; groupTypes.textord = function(group, options) { return buildCommon.makeOrd(group, options, "textord"); }; groupTypes.bin = function(group, options) { ...
function katex.buildCommon.makeSpan (classes, children, options)
- description and source-code
makeSpan = function (classes, children, options) { var span = new domTree.span(classes, children, options); sizeElementFromChildren(span); return span; }
- example usage
function katex.buildCommon.makeSymbol (value, fontFamily, mode, options, classes)
- description and source-code
makeSymbol = function (value, fontFamily, mode, options, classes) { // Replace the value with its replaced value from symbol.js if (symbols[mode][value] && symbols[mode][value].replace) { value = symbols[mode][value].replace; } var metrics = fontMetrics.getCharacterMetrics(value, fontFamily); var symbolNode; if (metrics) { var italic = metrics.italic; if (mode === "text") { italic = 0; } symbolNode = new domTree.symbolNode( value, metrics.height, metrics.depth, italic, metrics.skew, classes); } else { // TODO(emily): Figure out a good way to only print this in development typeof console !== "undefined" && console.warn( "No character metrics for '" + value + "' in style '" + fontFamily + "'"); symbolNode = new domTree.symbolNode(value, 0, 0, 0, 0, classes); } if (options) { if (options.style.isTight()) { symbolNode.classes.push("mtight"); } if (options.getColor()) { symbolNode.style.color = options.getColor(); } } return symbolNode; }
- example usage
... var base; var baseShift = 0; var slant = 0; if (group.value.symbol) { // If this is a symbol, create the symbol. var fontName = large ? "Size2-Regular" : "Size1-Regular"; base = buildCommon.makeSymbol( group.value.body, fontName, "math", options, ["mop", "op-symbol", large ? "large-op" : "small-op"]); // Shift the symbol so its center lies on the axis (rule 13). It // appears that our fonts have the centers of the symbols already // almost on the axis, so these numbers are very small. Note we // don't actually apply this here, but instead it is used either in ...
function katex.buildCommon.makeVList (children, positionType, positionData, options)
- description and source-code
makeVList = function (children, positionType, positionData, options) { var depth; var currPos; var i; if (positionType === "individualShift") { var oldChildren = children; children = [oldChildren[0]]; // Add in kerns to the list of children to get each element to be // shifted to the correct specified shift depth = -oldChildren[0].shift - oldChildren[0].elem.depth; currPos = depth; for (i = 1; i < oldChildren.length; i++) { var diff = -oldChildren[i].shift - currPos - oldChildren[i].elem.depth; var size = diff - (oldChildren[i - 1].elem.height + oldChildren[i - 1].elem.depth); currPos = currPos + diff; children.push({type: "kern", size: size}); children.push(oldChildren[i]); } } else if (positionType === "top") { // We always start at the bottom, so calculate the bottom by adding up // all the sizes var bottom = positionData; for (i = 0; i < children.length; i++) { if (children[i].type === "kern") { bottom -= children[i].size; } else { bottom -= children[i].elem.height + children[i].elem.depth; } } depth = bottom; } else if (positionType === "bottom") { depth = -positionData; } else if (positionType === "shift") { depth = -children[0].elem.depth - positionData; } else if (positionType === "firstBaseline") { depth = -children[0].elem.depth; } else { depth = 0; } // Make the fontSizer var maxFontSize = 0; for (i = 0; i < children.length; i++) { if (children[i].type === "elem") { maxFontSize = Math.max(maxFontSize, children[i].elem.maxFontSize); } } var fontSizer = makeFontSizer(options, maxFontSize); // Create a new list of actual children at the correct offsets var realChildren = []; currPos = depth; for (i = 0; i < children.length; i++) { if (children[i].type === "kern") { currPos += children[i].size; } else { var child = children[i].elem; var shift = -child.depth - currPos; currPos += child.height + child.depth; var childWrap = makeSpan([], [fontSizer, child]); childWrap.height -= shift; childWrap.depth += shift; childWrap.style.top = shift + "em"; realChildren.push(childWrap); } } // Add in an element at the end with no offset to fix the calculation of // baselines in some browsers (namely IE, sometimes safari) var baselineFix = makeSpan( ["baseline-fix"], [fontSizer, new domTree.symbolNode("u200b")]); realChildren.push(baselineFix); var vlist = makeSpan(["vlist"], realChildren); // Fix the final height and depth, in case there were kerns at the ends // since the makeSpan calculation won't take that in to account. vlist.height = Math.max(currPos, vlist.height); vlist.depth = Math.max(-depth, vlist.depth); return vlist; }
- example usage
... var supsub; if (!group.value.sup) { // Rule 18b subShift = Math.max( subShift, style.metrics.sub1, sub.height - 0.8 * style.metrics.xHeight); supsub = buildCommon.makeVList([ {type: "elem", elem: submid} ], "shift", subShift, options); supsub.children[0].style.marginRight = scriptspace; // Subscripts shouldn't be shifted by the base's italic correction. // Account for that by shifting the subscript back the appropriate ...
function katex.buildCommon.mathsym (value, mode, options, classes)
- description and source-code
mathsym = function (value, mode, options, classes) { // Decide what font to render the symbol in by its entry in the symbols // table. // Have a special case for when the value = because the is used as a // textord in unsupported command errors but cannot be parsed as a regular // text ordinal and is therefore not present as a symbol in the symbols // table for text if (value === "\" || symbols[mode][value].font === "main") { return makeSymbol(value, "Main-Regular", mode, options, classes); } else { return makeSymbol( value, "AMS-Regular", mode, options, classes.concat(["amsrm"])); } }
- example usage
... }; groupTypes.textord = function(group, options) { return buildCommon.makeOrd(group, options, "textord"); }; groupTypes.bin = function(group, options) { return buildCommon.mathsym( group.value, group.mode, options, ["mbin"]); }; groupTypes.rel = function(group, options) { return buildCommon.mathsym( group.value, group.mode, options, ["mrel"]); }; ...
function katex.buildCommon.prependChildren (span, children)
- description and source-code
prependChildren = function (span, children) { span.children = children.concat(span.children); sizeElementFromChildren(span); }
- example usage
... spaces.push(groups[i]); groups.splice(i, 1); i--; } else if (spaces) { if (groups[i] instanceof domTree.symbolNode) { groups[i] = makeSpan([].concat(groups[i].classes), [groups[i]]); } buildCommon.prependChildren(groups[i], spaces); spaces = null; } } if (spaces) { Array.prototype.push.apply(groups, spaces); } ...
module katex.delimiter
function katex.delimiter.customSizedDelim (delim, height, center, options, mode, classes)
- description and source-code
customSizedDelim = function (delim, height, center, options, mode, classes) { if (delim === "<" || delim === "\lt") { delim = "\langle"; } else if (delim === ">" || delim === "\gt") { delim = "\rangle"; } // Decide what sequence to use var sequence; if (utils.contains(stackNeverDelimiters, delim)) { sequence = stackNeverDelimiterSequence; } else if (utils.contains(stackLargeDelimiters, delim)) { sequence = stackLargeDelimiterSequence; } else { sequence = stackAlwaysDelimiterSequence; } // Look through the sequence var delimType = traverseSequence(delim, height, sequence, options); // Depending on the sequence element we decided on, call the appropriate // function. if (delimType.type === "small") { return makeSmallDelim(delim, delimType.style, center, options, mode, classes); } else if (delimType.type === "large") { return makeLargeDelim(delim, delimType.size, center, options, mode, classes); } else if (delimType.type === "stack") { return makeStackedDelim(delim, height, center, options, mode, classes); } }
- example usage
... } var leftDelim; var rightDelim; if (group.value.leftDelim == null) { leftDelim = makeNullDelimiter(options, ["mopen"]); } else { leftDelim = delimiter.customSizedDelim( group.value.leftDelim, delimSize, true, options.withStyle(style), group.mode, ["mopen"]); } if (group.value.rightDelim == null) { rightDelim = makeNullDelimiter(options, ["mclose"]); } else { rightDelim = delimiter.customSizedDelim( ...
function katex.delimiter.leftRightDelim (delim, height, depth, options, mode, classes)
- description and source-code
leftRightDelim = function (delim, height, depth, options, mode, classes) { // We always center left/right delimiters, so the axis is always shifted var axisHeight = options.style.metrics.axisHeight * options.style.sizeMultiplier; // Taken from TeX source, tex.web, function make_left_right var delimiterFactor = 901; var delimiterExtend = 5.0 / fontMetrics.metrics.ptPerEm; var maxDistFromAxis = Math.max( height - axisHeight, depth + axisHeight); var totalHeight = Math.max( // In real TeX, calculations are done using integral values which are // 65536 per pt, or 655360 per em. So, the division here truncates in // TeX but doesn't here, producing different results. If we wanted to // exactly match TeX's calculation, we could do // Math.floor(655360 * maxDistFromAxis / 500) * // delimiterFactor / 655360 // (To see the difference, compare // x^{x^{left(rule{0.1em}{0.68em}right)}} // in TeX and KaTeX) maxDistFromAxis / 500 * delimiterFactor, 2 * maxDistFromAxis - delimiterExtend); // Finally, we defer to 'makeCustomSizedDelim' with our calculated total // height return makeCustomSizedDelim(delim, totalHeight, true, options, mode, classes); }
- example usage
... var leftDelim; if (group.value.left === ".") { // Empty delimiters in left and right make null delimiter spaces. leftDelim = makeNullDelimiter(options, ["mopen"]); } else { // Otherwise, use leftRightDelim to generate the correct sized // delimiter. leftDelim = delimiter.leftRightDelim( group.value.left, innerHeight, innerDepth, options, group.mode, ["mopen"]); } // Add it to the beginning of the expression inner.unshift(leftDelim); // Handle middle delimiters ...
function katex.delimiter.sizedDelim (delim, size, options, mode, classes)
- description and source-code
sizedDelim = function (delim, size, options, mode, classes) { // < and > turn into langle and rangle in delimiters if (delim === "<" || delim === "\lt") { delim = "\langle"; } else if (delim === ">" || delim === "\gt") { delim = "\rangle"; } // Sized delimiters are never centered. if (utils.contains(stackLargeDelimiters, delim) || utils.contains(stackNeverDelimiters, delim)) { return makeLargeDelim(delim, size, false, options, mode, classes); } else if (utils.contains(stackAlwaysDelimiters, delim)) { return makeStackedDelim( delim, sizeToMaxHeight[size], false, options, mode, classes); } else { throw new ParseError("Illegal delimiter: '" + delim + "'"); } }
- example usage
... if (delim === ".") { // Empty delimiters still count as elements, even though they don't // show anything. return makeSpan([group.value.mclass]); } // Use delimiter.sizedDelim to generate the delimiter. return delimiter.sizedDelim( delim, group.value.size, options, group.mode, [group.value.mclass]); }; groupTypes.leftright = function(group, options) { // Build the inner expression var inner = buildExpression(group.value.body, options.reset(), true); ...
module katex.domTree
function katex.domTree.documentFragment (children)
- description and source-code
function documentFragment(children) { this.children = children || []; this.height = 0; this.depth = 0; this.maxFontSize = 0; }
- example usage
... sizeElementFromChildren(span); }; /** * Makes a document fragment with the given list of children. */ var makeFragment = function(children) { var fragment = new domTree.documentFragment(children); sizeElementFromChildren(fragment); return fragment; }; /** ...
function katex.domTree.span (classes, children, options)
- description and source-code
function span(classes, children, options) { this.classes = classes || []; this.children = children || []; this.height = 0; this.depth = 0; this.maxFontSize = 0; this.style = {}; this.attributes = {}; if (options) { if (options.style.isTight()) { this.classes.push("mtight"); } if (options.getColor()) { this.style.color = options.getColor(); } } }
- example usage
... * * TODO: Ensure that 'options' is always provided (currently some call sites * don't pass it). * TODO: add a separate argument for math class (e.g. 'mop', 'mbin'), which * should if present come first in 'classes'. */ var makeSpan = function(classes, children, options) { var span = new domTree.span(classes, children, options); sizeElementFromChildren(span); return span; }; /** ...
function katex.domTree.symbolNode (value, height, depth, italic, skew, classes, style)
- description and source-code
function symbolNode(value, height, depth, italic, skew, classes, style) { this.value = value || ""; this.height = height || 0; this.depth = depth || 0; this.italic = italic || 0; this.skew = skew || 0; this.classes = classes || []; this.style = style || {}; this.maxFontSize = 0; // Mark CJK characters with specific classes so that we can specify which // fonts to use. This allows us to render these characters with a serif // font in situations where the browser would either default to a sans serif // or render a placeholder character. if (unicodeRegexes.cjkRegex.test(value)) { // I couldn't find any fonts that contained Hangul as well as all of // the other characters we wanted to test there for it gets its own // CSS class. if (unicodeRegexes.hangulRegex.test(value)) { this.classes.push('hangul_fallback'); } else { this.classes.push('cjk_fallback'); } } if (/[îïíì]/.test(this.value)) { // add ī when we add Extended Latin this.value = iCombinations[this.value]; } }
- example usage
... var symbolNode; if (metrics) { var italic = metrics.italic; if (mode === "text") { italic = 0; } symbolNode = new domTree.symbolNode( value, metrics.height, metrics.depth, italic, metrics.skew, classes); } else { // TODO(emily): Figure out a good way to only print this in development typeof console !== "undefined" && console.warn( "No character metrics for '" + value + "' in style '" + fontFamily + "'"); ...
module katex.fontMetrics
function katex.fontMetrics.getCharacterMetrics (character, style)
- description and source-code
getCharacterMetrics = function (character, style) { var ch = character.charCodeAt(0); if (character[0] in extraCharacterMap) { ch = extraCharacterMap[character[0]].charCodeAt(0); } else if (cjkRegex.test(character[0])) { ch = 'M'.charCodeAt(0); } var metrics = metricMap[style][ch]; if (metrics) { return { depth: metrics[0], height: metrics[1], italic: metrics[2], skew: metrics[3], width: metrics[4] }; } }
- example usage
... */ var makeSymbol = function(value, fontFamily, mode, options, classes) { // Replace the value with its replaced value from symbol.js if (symbols[mode][value] && symbols[mode][value].replace) { value = symbols[mode][value].replace; } var metrics = fontMetrics.getCharacterMetrics(value, fontFamily); var symbolNode; if (metrics) { var italic = metrics.italic; if (mode === "text") { italic = 0; } ...
module katex.mathMLTree
function katex.mathMLTree.MathNode (type, children)
- description and source-code
function MathNode(type, children) { this.type = type; this.attributes = {}; this.children = children || []; }
- example usage
... /** * Functions for handling the different types of groups found in the parse * tree. Each function should take a parse group and return a MathML node. */ var groupTypes = {}; groupTypes.mathord = function(group, options) { var node = new mathMLTree.MathNode( "mi", [makeText(group.value, group.mode)]); var variant = getVariant(group, options); if (variant) { node.setAttribute("mathvariant", variant); } ...
function katex.mathMLTree.TextNode (text)
- description and source-code
function TextNode(text) { this.text = text; }
- example usage
... * optional replacement from symbols.js. */ var makeText = function(text, mode) { if (symbols[mode][text] && symbols[mode][text].replace) { text = symbols[mode][text].replace; } return new mathMLTree.TextNode(text); }; /** * Returns the math variant as a string or null if none is required. */ var getVariant = function(group, options) { var font = options.font; ...
module katex.parseData
function katex.parseData.ParseNode (type, value, mode, firstToken, lastToken)
- description and source-code
function ParseNode(type, value, mode, firstToken, lastToken) { this.type = type; this.value = value; this.mode = mode; if (firstToken && (!lastToken || lastToken.lexer === firstToken.lexer)) { this.lexer = firstToken.lexer; this.start = firstToken.start; this.end = (lastToken || firstToken).end; } }
- example usage
module katex.utils
function katex.utils.clearNode (node)
- description and source-code
function clearNode(node) { setTextContent(node, ""); }
- example usage
... var utils = require("./src/utils"); /** * Parse and build an expression, and place that expression in the DOM node * given. */ var render = function(expression, baseNode, options) { utils.clearNode(baseNode); var settings = new Settings(options); var tree = parseTree(expression, settings); var node = buildTree(tree, expression, settings).toNode(); baseNode.appendChild(node); ...
function katex.utils.contains (list, elem)
- description and source-code
contains = function (list, elem) { return indexOf(list, elem) !== -1; }
- example usage
... throw new ParseError( "Mismatch: \begin{" + envName + "} matched " + "by \end{" + end.value.name + "}", endNameToken); } result.position = end.position; return result; } else if (utils.contains(sizeFuncs, func)) { // If we see a sizing function, parse out the implict body body = this.parseExpression(false); return new ParseNode("sizing", { // Figure out what size to use based on the list of functions above size: "size" + (utils.indexOf(sizeFuncs, func) + 1), value: body }, this.mode); ...
function katex.utils.deflt (setting, defaultIfUndefined)
- description and source-code
deflt = function (setting, defaultIfUndefined) { return setting === undefined ? defaultIfUndefined : setting; }
- example usage
... var pt = 1 / fontMetrics.metrics.ptPerEm; var arraycolsep = 5 * pt; // arraycolsep in article.cls // Vertical spacing var baselineskip = 12 * pt; // see size10.clo // Default arraystretch from lttab.dtx // TODO(gagern): may get redefined once we have user-defined macros var arraystretch = utils.deflt(group.value.arraystretch, 1); var arrayskip = arraystretch * baselineskip; var arstrutHeight = 0.7 * arrayskip; // strutbox in ltfsstrc.dtx and var arstrutDepth = 0.3 * arrayskip; // @arstrutbox in lttab.dtx var totalHeight = 0; for (r = 0; r < group.value.body.length; ++r) { var inrow = group.value.body[r]; ...
function katex.utils.escape (text)
- description and source-code
function escape(text) { return ("" + text).replace(ESCAPE_REGEX, escaper); }
- example usage
... */ span.prototype.toMarkup = function() { var markup = "<span"; // Add the class if (this.classes.length) { markup += " class=""; markup += utils.escape(createClass(this.classes)); markup += """; } var styles = ""; // Add the styles, after hyphenation for (var style in this.style) { ...
function katex.utils.hyphenate (str)
- description and source-code
hyphenate = function (str) { return str.replace(uppercase, "-$1").toLowerCase(); }
- example usage
... } var styles = ""; // Add the styles, after hyphenation for (var style in this.style) { if (this.style.hasOwnProperty(style)) { styles += utils.hyphenate(style) + ":" + this.style[style] + ";"; } } if (styles) { markup += " style="" + utils.escape(styles) + """; } ...
function katex.utils.indexOf (list, elem)
- description and source-code
indexOf = function (list, elem) { if (list == null) { return -1; } if (nativeIndexOf && list.indexOf === nativeIndexOf) { return list.indexOf(elem); } var i = 0; var l = list.length; for (; i < l; i++) { if (list[i] === elem) { return i; } } return -1; }
- example usage
... */ Parser.prototype.parseExpression = function(breakOnInfix, breakOnTokenText) { var body = []; // Keep adding atoms to the body until we can't parse any more atoms (either // we reached the end, a }, or a right) while (true) { var lex = this.nextToken; if (endOfExpression.indexOf(lex.text) !== -1) { break; } if (breakOnTokenText && lex.text === breakOnTokenText) { break; } if (breakOnInfix && functions[lex.text] && functions[lex.text].infix) { break; ...
misc
- this document was created with utility2