Commit 94803f5
authored
Fix input handling for
The implementation assumed that in cases like the above input,
everything before the `()` would be highlighted the same regardless
of what follows afterwards, however, for `function`, the parentheses
have actual meaning. Therefore, only remove `()` for code highlighting
input size reduction if they are:
- Not the last match in the code, or
- Followed by something that definitely terminates the input block,
i.e. a closing bracket, quote, etc.
Fixes: https://jira.mongodb.org/browse/MONGOSH-759(function() => { ... (#7)1 parent 26a48e3 commit 94803f5
2 files changed
+25
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
180 | | - | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
181 | 200 | | |
182 | 201 | | |
183 | 202 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
| 107 | + | |
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
122 | 126 | | |
123 | 127 | | |
124 | 128 | | |
| |||
0 commit comments