Commit Graph

778 Commits

Author SHA1 Message Date
meganrogge
b2eca1fd4d Fix InMemoryDocument to support both OS line endings
Co-authored-by: mjbvz <matb@microsoft.com>
Co-authored-by: meganrogge <megan.rogge@microsoft.com>
2020-11-11 14:05:20 -08:00
Rob Lourens
35f9bac07d Disable markdown smart select tests #110365 2020-11-10 20:02:24 -08:00
Erik Krogh Kristensen
7a4e81a674 fix catastrophic backtracking when parsing markdown files (#109964) 2020-11-10 14:56:06 -08:00
Megan Rogge
63d15a97c7 Support character markup in mardown smart select (#110195)
* create tests and add selection functions for inline ranges
2020-11-10 11:38:27 -08:00
David Sanders
fcef0e3db4 Use Array.flat() (#110189) 2020-11-09 12:46:26 -08:00
meganrogge
6e2aa0bfb7 clean up code and remove unused methods 2020-11-06 12:42:17 -08:00
David Sanders
153ba443d5 Use string.matchAll (#110074) 2020-11-06 11:49:56 -08:00
meganrogge
fc07b2f170 add comments to clarify code 2020-11-06 11:38:21 -08:00
Matt Bierner
24b28f57be Always use vscode.open to open markdown links
Fixes #108998

This ensures we use the custom editor if it is the default
2020-11-05 17:00:16 -08:00
meganrogge
08e556dc5d fix #109486 and #109489 2020-11-04 10:16:06 -08:00
Megan Rogge
5d4df8273e markdown smart select (#108818)
smart select
2020-10-26 15:33:48 -07:00
Matt Bierner
dd124a5cae Cleaning up code
- Use more explicit names
- extract
- Use `??`
2020-10-16 17:18:44 -07:00
Nafana
df59ceb026 Markdown reference links starting with ^ should not be clickable (#108015)
Co-authored-by: mmacovei <mmacovei@sfu.ca>
2020-10-08 00:38:17 -06:00
Matt Bierner
240afbde58 Use array.equals 2020-09-16 11:58:01 -07:00
Ladislau Szomoru
06730e3e29 Azure DevOps pipeline - generate unique test result names (#105148)
* Set suite name based on environment variable
2020-08-21 15:05:15 +02:00
Ladislau Szomoru
b2efcbf687 Add process.arch into the test results file name (#104946) 2020-08-19 07:48:37 +02:00
Johannes Rieken
4398a424d5 fix compile error 2020-08-13 12:49:55 +02:00
Jean Pierre
f732547a3d Fixes #103076 (#103578) 2020-07-29 15:31:50 -07:00
Matt Bierner
2a8c8def27 Re-enable markdown document link tests
Fixes #102364
2020-07-14 09:23:39 -07:00
Matt Bierner
3926674c39 Skip document link tests
These currently do not work on web

Skipping while investigating this
2020-07-13 14:07:29 -07:00
Matt Bierner
1cfd3a1b28 Use own version of toJson
This avoids having the uri transformed unexpectedly
2020-07-13 10:56:21 -07:00
Matt Bierner
fdf23dc5f9 Working on supporting markdown links in serverless+web
For #101203
2020-07-10 13:25:55 -07:00
Matt Bierner
362d345448 Adding tests for opening markdown document links 2020-07-10 13:25:55 -07:00
Matt Bierner
eb29e868de Use uri 2020-07-10 13:25:16 -07:00
Matt Bierner
ef02845561 Convert to async 2020-07-10 13:25:16 -07:00
Matt Bierner
3a54cd7ca3 Disable markdown commands when in markdown cells in notebooks
Fixes #101514
2020-07-06 14:59:29 -07:00
Matt Bierner
1275b918be Use joinPath in a few more places 2020-06-10 16:44:10 -07:00
Matt Bierner
b5ba760623 Adopt Uri.joinPath
For #99717
2020-06-09 16:08:42 -07:00
Matt Bierner
a51205f59d Fix markdown preview in serverless
For #99717
2020-06-09 16:04:47 -07:00
Matt Bierner
b42086b6eb Enable markdown language features for web/serverless 2020-06-09 15:32:18 -07:00
Matt Bierner
3e9b7f5072 Fix markdown fontsize
Fixes #98178
2020-05-20 15:40:27 -07:00
Matt Bierner
41ca01f942 Remove console log
Fixes #96915
2020-05-04 17:28:33 -07:00
Thomas Weingartner
b5136c0c79 Fix to 'Markdown Preview of relative links drops 'host' from path' (#95092)
* Fix #93691

* Fix #93961
2020-04-13 14:43:00 -07:00
Matt Bierner
e7bc301be6 When clicking on a link to a folder in markdown, reveal the folder
Fixes #91336
2020-04-13 13:02:14 -07:00
Matt Bierner
9cfd597153 Rework markdown preview code to better support markdown preview editors
Splits the preview part of the markdown preview from the dynamic preview management part of things. Static preview swap to preview the active markdown file and don't scroll sync with any other markdown files
2020-04-11 17:30:12 -07:00
Ilia Pozdnyakov
f3a31a4eeb fix uri fragment slugification #94508 (#94655) 2020-04-09 14:21:18 -07:00
Matt Bierner
d4ce7148dd New custom editor API proposal
For #77131

Fixes #93963
Fixes #94515
Fixes #94517
Fixes #94527
Fixes #94509
Fixes #94514
Fixes #93996
Fixes #93913

This removes explicit edits from the API and reshapes the API to more closely match VS Code's internal API. The change also tries to better express the lifecycle of backups
2020-04-08 17:53:39 -07:00
Matt Bierner
d41997790c Remove CustomDocument.viewType
Fixes #93867
For #77131

This property is no longer needed (or very helpful) with the current api design
2020-03-31 12:00:17 -07:00
Matt Bierner
579dab3196 Update custom editor api
For #77131

- Use a class for `CustomDocument` instead of an interface. Extensions can now add their own data to a `CustomDocument` by sublassing

- Renamed `resolveCustomDocument` to `openCustomDocument` and require that extensions return a `CustomDocument`

- Exposed edits on `CustomDocument`

- Made the third parameter of `registerCustomEditorProvider` a generic options bag that takes a `webviewOptions`
2020-03-23 13:10:49 -07:00
Huachao Mao
9abd38f362 Fix typo of word extension (#93178) 2020-03-23 12:32:32 -07:00
Matt Bierner
9dae408dc3 Switch webview api back to use delegate model
For #77131

Going back the the delegate based model for a few reasons:

- It gives us a better approach to add additional API hooks in the future (such as for rename)

- In practive, the capabilities were almost always the same as the `userData` on the document. It is rather confusing to have both `userData` and the capabilities 'on' the document
2020-03-12 16:54:48 -07:00
Benno
0b3e54edb1 update #91296 allow multiple workspace roots (#92082)
* update #91296 allow multiple workspace roots

* update #92082
2020-03-09 12:56:54 -07:00
Pine Wu
2362584a62 Revert "Fix #73803"
This reverts commit 67e6aef0c8.
2020-03-06 00:30:14 -08:00
Pine Wu
4857a9a746 Revert "Fix integration test"
This reverts commit 5a0ab960f0.
2020-03-06 00:29:57 -08:00
Pine Wu
5a0ab960f0 Fix integration test 2020-03-05 12:41:06 -08:00
Pine Wu
67e6aef0c8 Fix #73803 2020-03-05 11:34:58 -08:00
Matt Bierner
022b6c6d23 Use customtexteditor for markdown editor 2020-03-04 14:14:31 -08:00
Matt Bierner
6e30cf38a7 Mark markdown comment folding regions as comments
Fixes #91271
2020-03-02 11:26:29 -08:00
Matt Bierner
8291f8c152 Polishing of custom editor api proposal for 1.43 release
For #77131
2020-02-25 10:55:41 -08:00
Matt Bierner
99d5733e5f New iteration of webview editor API proposal
For #77131

**Motivation**
While our existing webview editor API proposal more or less works, building an editable webview editor is fairly tricky using it! This is especially true for simple text based editors.

It'd also be nice if we could get bi-directional live editing for text files. For example, if I open the same file in a webview editor and in VS Code's normal editor, edits on either side should be reflected in the other. While this can sort of be implemented using the existing API, it has some big limitations

**Overview of changes**
To address these problems, we've decided have two types of webview editors:

- Text based webview editors. These editors used a `TextDocument` as their data model, which considerably simplifies implementing an editable webview. In almost all cases, this should be what you use for text files

- Complex webview editors. This is basically the existing proposed API. This gives extension hooks into all the VS Code events, such as `save`, `undo`, and so on. These should be used for binary files or in very complex text editor cases.

Both editor types now have an explicit model layer based on documents. Text editor use `TextDocument` for this, while custom editors use `WebviewEditorCustomDocument`. This replaces the delegate based approach previously used.
2020-02-21 16:26:01 -08:00