-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
Fix codeblock detection to catch blocks not on first lines #132821
Conversation
Thanks for the PR! I think this makes sense but can you also add some tests to make sure we are doing the correct thing and don't regress this in the future:
|
One thing actually: we need to support For those cases, the text should be treated as if it was a code block even though there is no explicit fenced code block |
@mjbvz am I missing something obvious here? I tried to follow the instructions at https://github.com/microsoft/vscode/blob/main/test/unit/README.md to run the tests (with |
Thanks! No wonder I didn't see that... have never really heavily used the debugger for tests. Test cases: /**
* @example
* foo();
*
* @example
* Caption
* ```ts
* foo();
* ```
*/
function foo() {
} /**
* @example <caption>Caption</caption>
* bar();
*
* @example <caption>Caption</caption>
* ```ts
* bar();
* ```
*/
function bar() {
} |
eb226ae
to
0c486c8
Compare
Disabled tests were failing, unrelated to my changes. |
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.
LGTM besides the comments
extensions/typescript-language-features/src/test/smoke/referencesCodeLens.test.ts
Outdated
Show resolved
Hide resolved
extensions/typescript-language-features/src/test/unit/previewer.test.ts
Outdated
Show resolved
Hide resolved
0c486c8
to
8e35bdb
Compare
91260e0
to
f44b621
Compare
f44b621
to
981c7f7
Compare
Thanks! This change will in the next VS Code 1.62 insiders build |
This PR fixes #132820