-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Fix problem with $$ not being put around the correct items in a LaTeX equation #8707
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
`; | ||
|
||
test('Latex - Equations don\'t have $$', () => { | ||
const markdown4 = ` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
THis is the one that was failing in the bug
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tip you can use dedent to indent code,
(its more reliable and avoids issues when code gets accidentally indented).
check
vscode-python/src/test/common/process/pythonDaemon.functional.test.ts
Lines 124 to 134 in 85b828e
test('Execute a file and capture stdout (with unicode)', async () => { | |
const source = dedent` | |
import sys | |
sys.stdout.write("HELLO WORLD-₹-😄") | |
`; | |
const fileToExecute = await createPythonFile(source); | |
const output = await pythonDaemon.exec([fileToExecute], {}); | |
assert.isUndefined(output.stderr); | |
assert.deepEqual(output.stdout, 'HELLO WORLD-₹-😄'); | |
}); |
const endOfEnd = input.indexOf('}', endIndexes[i] + 1 + 8 * i); | ||
// Loop until we run out string | ||
while (start < input.length) { | ||
// Check $$, $ and begin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, maybe I'll put a more general comment about the algorithm being used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even after reading the comments, its quite complicated. I guess there's nothing we can do about that...
Codecov Report
@@ Coverage Diff @@
## master #8707 +/- ##
=========================================
- Coverage 59.17% 58.9% -0.27%
=========================================
Files 521 521
Lines 23985 24010 +25
Branches 3874 3874
=========================================
- Hits 14192 14143 -49
- Misses 8876 8951 +75
+ Partials 917 916 -1
Continue to review full report at Codecov.
|
const endOfEnd = input.indexOf('}', endIndexes[i] + 1 + 8 * i); | ||
// Loop until we run out string | ||
while (start < input.length) { | ||
// Check $$, $ and begin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even after reading the comments, its quite complicated. I guess there's nothing we can do about that...
`; | ||
|
||
test('Latex - Equations don\'t have $$', () => { | ||
const markdown4 = ` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tip you can use dedent to indent code,
(its more reliable and avoids issues when code gets accidentally indented).
check
vscode-python/src/test/common/process/pythonDaemon.functional.test.ts
Lines 124 to 134 in 85b828e
test('Execute a file and capture stdout (with unicode)', async () => { | |
const source = dedent` | |
import sys | |
sys.stdout.write("HELLO WORLD-₹-😄") | |
`; | |
const fileToExecute = await createPythonFile(source); | |
const output = await pythonDaemon.exec([fileToExecute], {}); | |
assert.isUndefined(output.stderr); | |
assert.deepEqual(output.stdout, 'HELLO WORLD-₹-😄'); | |
}); |
… equation (#8707) * First try * Add news entry and fix multiples * Add a bunch of comments
* Ensure we run PR, CI pipelines on release branches (#8471) (#8474) * Port blue icon and altair background fixes into release (#8470) * fix blue color on export icon (#8449) * default non-text mimetypes to white background (#8452) * Fix cells being erased when saving and then changing focus to another… (#8482) (#8485) * Fix cells being erased when saving and then changing focus to another cell * Make sure to use the source even if it's empty * Fix timeout to be what it was before. 10 seconds isn't long enough (#8504) * Ensure wheels experiment control and experiment groups uses right wheel (#8461) (#8546) * Ensure wheels control group uses no wheel ptvsd * Improve condition readability in jupyter debugger * Adjust debug adapter experiment before release (#8540) (#8553) * Release branch: updating change log and package json (#8570) * Change version numbers * Update package lock json * Update changelog * Fix for 7999 - CTRL+Z should not undo at the top level (#8571) * Fix arrowing up and down to save code too (#8574) * Prompt selecting a file to save once (#8590) * Prompt selecting a file to save once * Better algorithm * After pasting code, arrow keys don't navigate in a cell. (#8587) * Don't look for a jupyter interpreter when creating blank notebook (#8596) * Creating a new blank notebook should not require a search for jupyter. * Fix bug caused by other fix. * Update change log * Update release date in change log (#8604) * Fix converting from a python script (#8699) * Fix converting from a python script * Fix linter error * Fix problem with $$ not being put around the correct items in a LaTeX equation (#8707) * First try * Add news entry and fix multiples * Add a bunch of comments * Modify changelog and version number * Fixes to starting Jupyter in a Docker container. (#8715) * Ensure we generate the right args when running in docker * Fixes to starting `Jupyter` in a `Docker` container. * Ensure arguments are generated correctly for `getRemoteLauncherCommand` when in debugger experiment (#8712) * Return new debugger arguments when in experiment * Add news item * Updates to change log * Revert tests due to incompatibilities
For #8673
Added a bunch of unit tests (in particular the one that was failing).