Commit Graph

698 Commits

Author SHA1 Message Date
Matt Bierner
f3cb3510b8 Use joinLines helper 2022-03-30 15:14:34 -07:00
Matt Bierner
bea2ce0111 Add assertReferencesEqual helper 2022-03-30 15:14:33 -07:00
Matt Bierner
f68db8f6ba Compare normalized fragments for md references
For #146277
2022-03-30 15:14:33 -07:00
Matt Bierner
767178d1b9 Remove duplicate function 2022-03-30 15:14:33 -07:00
Matt Bierner
d441406b1e Include invalid references as targets for find all references
For #146277
2022-03-30 14:36:03 -07:00
Matt Bierner
17783a09e5 Add support for reference to ref links in md
For #146277
2022-03-30 14:36:03 -07:00
Matt Bierner
0d69c2bbb7 💄 2022-03-30 14:36:02 -07:00
Matt Bierner
6d1b112d13 Make MdWorkspaceCache always store promises
Makes working with the class easier
2022-03-30 11:50:37 -07:00
Matt Bierner
2754cef4a7 Fix finding references from link without header ref 2022-03-30 11:38:50 -07:00
Matt Bierner
ebd490f28e Improve markdown references
For #146277

- Find all references on links
- Better support for links without a file extension
2022-03-30 11:38:50 -07:00
Matt Bierner
d06c17bd1b Respect includeDeclaration for markdown references 2022-03-29 18:28:28 -07:00
Matt Bierner
8adb42079b Fix slow positionAt impl for markdown references
- Use `vscode-languageserver-textdocument` instead of custom impl
- Reuse `InMemoryDocument`  across tests and working code
- Use `SkinnyTextDocument` in more places
- Fixes some test errors that seem to be caused by bad `InMemoryDocument` impl
2022-03-29 18:19:52 -07:00
Matt Bierner
338ae07ccb Initial work on md references provider
#146277
2022-03-29 18:19:52 -07:00
Matt Bierner
9b6435af76 Extract MdWorkspaceCache
This lets us reuse this logic in other places
2022-03-29 18:19:51 -07:00
Matt Bierner
407b66a6d4 Remove extra await 2022-03-29 18:19:51 -07:00
Matt Bierner
0c3a241171 💄 2022-03-29 18:19:50 -07:00
Matt Bierner
3ce5c78cb9 Extract workspaceContents to own file 2022-03-29 18:19:49 -07:00
Matt Bierner
2783263582 Clean up link provider 2022-03-29 18:19:47 -07:00
Matt Bierner
22fb4e9de8 Better align language provider names and export styles
- Use named exports
- use `Md*` for providers
2022-03-29 13:35:48 -07:00
Matt Bierner
4949f13d13 Organize imports 2022-03-29 13:25:40 -07:00
Matt Bierner
252515e59d 💄 2022-03-29 13:25:40 -07:00
Matt Bierner
a2d9157a9a Extract markdown scrolling code to own file 2022-03-29 13:25:39 -07:00
Matt Bierner
d49fc3ca8d Move files to better folders and add better name 2022-03-29 13:25:38 -07:00
Matt Bierner
c8c6224c84 Remove unused hash functions 2022-03-29 13:25:37 -07:00
Matt Bierner
3bc3b1f8ec Use padStart 2022-03-29 13:25:37 -07:00
Matt Bierner
b21350fdcb Use string uri as key instead of fsPath 2022-03-29 13:25:36 -07:00
Matt Bierner
28e2475f72 Use find instead of filter 2022-03-29 13:25:36 -07:00
Matt Bierner
15c617e5b0 Use ._register 2022-03-29 13:25:35 -07:00
Matt Bierner
7736c87cb0 Move markdown preview files to own folder 2022-03-29 13:25:35 -07:00
Matt Bierner
ffd8aea1a7 Remove outdated comment 2022-03-29 13:25:34 -07:00
Matt Bierner
e6e907e721 Move drop into feature to own file 2022-03-22 18:18:03 -07:00
Matt Bierner
77d9be7a45 Use text/uri-list for drop into editor
For #145713
2022-03-22 17:36:32 -07:00
Matt Bierner
82c70007a3 Make sure we decode path components for md path completions
Fixes #145447
2022-03-22 16:58:37 -07:00
Matt Bierner
d2db6fb2d0 Remove negative lookbehind in regexp
Fixes #145655
2022-03-22 14:34:46 -07:00
Johannes
0f648cd7db add eslint rule to disallow look behind regex feature, ignore in git and markdown fyi @lszomoru, @mjbvz 2022-03-22 16:02:19 +01:00
Matt Bierner
bfc026b97a Drop into text editor api proposal (#143334)
* Add drop into editor api proposal

For #142990

* Use AsyncEmitter
2022-03-18 11:32:11 -07:00
Matt Bierner
307364a174 Check the static line cache for markdown custom editors
Fixes #138161
2022-03-17 16:06:07 -07:00
BamBamboozled
b6f6a37cbd Add support for references when no [] exists (#144781)
* add single reference linking regex

* add less invasive regex

* add lookahead to exclude [tag]: <url> case

* add tests for references when no [] exists

* revert integration test script

* make test description clearer

* remove vim swap file (whoops)

Co-authored-by: Jayce <grate.resales.0r@icloud.com>
Co-authored-by: Jefferson Chen <jc@Jeffersons-MBP.attlocal.net>
2022-03-17 12:55:31 -07:00
Matt Bierner
bd36b7d6a3 Make sure we set html on markdown preview when it is not visible
Fixes #138630

If the webview does not exist, we need to update the html on it instead of posting a message to it. This makes sure the correct content is shown when the webview is created again

This also removes a previous workaround for this issue that I no longer believe is required
2022-03-08 18:08:47 -08:00
Matt Bierner
78e1b3cca8 Bump highlight JS version 2022-03-08 16:27:42 -08:00
Matt Bierner
79d381f1df Use vscode-uri instead of node's path
This makes sure we handle other types of uris instead of assuming they are all file uris
2022-03-08 15:48:13 -08:00
Matt Bierner
7f39250d49 Remove extra spread 2022-03-08 14:51:45 -08:00
Matt Bierner
6d64839d01 Fix test 2022-02-24 14:33:55 -08:00
Matt Bierner
2363668892 Don't encode label for md path completions
For #142838
2022-02-24 13:52:31 -08:00
Matt Bierner
a56905be63 Use decodeURIComponent instead of decodeUri
This is not actually a uri
2022-02-24 13:52:31 -08:00
Matt Bierner
9e3d77b1e4 Also use relative pattern for watching markdown resources 2022-02-22 16:22:55 -08:00
Matt Bierner
7f5be63be9 Escape spaces in file names for md suggestions
Fixes #142838
2022-02-11 16:18:24 -08:00
Kazuyuki Sato
a83046f9e6 Decode header suggestions in Markdown path IntelliSense, https://github.com/microsoft/vscode/issues/142330 (#142392) 2022-02-07 09:19:24 -08:00
Matt Bierner
1981fd8ece Fix markdown previews not having an icon 2022-02-03 12:01:10 -08:00
Johannes Rieken
4a130c40ed enable @typescript-eslint/member-delimiter-style, https://github.com/microsoft/vscode/issues/140391 2022-02-02 14:35:33 +01:00