Commit Graph

973 Commits

Author SHA1 Message Date
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
dc68e6578e rename custom editor activation event
For #77131

Renames the activation event from `onWebviewEditor` to `onCustomEditor` to be consistent with the reset of the API
2020-02-26 10:59:36 -08:00
Matt Bierner
dc1e7871b8 Rename custom editor contribution point
Renaming to match new API proposal
2020-02-25 10:55:41 -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
태재영
a03df2d635 update markdown-it-front-matter version (#90122) 2020-02-10 14:45:13 -08:00
Benjamin Pasero
c2444b42af tests - proper text fixtures dir 2020-02-10 15:33:04 +01:00
Matt Bierner
b1c5e2f19b Don't include dom typings in extensions (#89942)
**Problem**
All of our extensions currently are built using the dom typings. This can lead to runtime errors if you mistakenly use `window` or similar

**Fix**
Exclude the dom typings from compile. Then explicitly import the node types for `URL` and `TextEncoder`
2020-02-04 11:08:22 -08:00
Johannes Rieken
856d085279 run "eslint --fix" to get some changes for free 2020-01-02 20:14:09 +01:00
Jonathan Carter
780d875d6f Remove scheme restriction for Markdown/Emmet language features (#87541)
* Remove scheme restriction for Markdown/Emmet

* Explicitly marking scheme support
2019-12-29 17:11:38 -07:00
Matt Bierner
8e475f9b24 Implement draft 2 from #86802 (#87117) 2019-12-16 14:18:58 -08:00
Matt Bierner
007b3032ad Update to TS 3.7.3 for building VS Code 2019-12-11 15:58:59 -08:00
Martin Aeschlimann
eeee6244d9 [josn] fix wrong schema-schema reference, use draft-07 everywhere 2019-12-05 11:15:39 +01:00
Matt Bierner
97855786a0 Fix absolute paths in markdown preview on windows
Fixes #84728

We should use `.fsPath` for both parts of the uri in this case.
2019-12-02 19:45:44 -08:00
Andrew Liu
37eeb3755a quick fix (#85506) 2019-11-25 11:30:04 -08:00
Matt Bierner
0e5a5f6524 Better time logging for js + markdown
We don't need full date, only times
2019-11-19 11:22:08 -08:00
Matt Bierner
5b428d2ec1 Don't use locale strings
For #84803

These can cause issues on node 12
2019-11-18 09:35:35 -08:00
Matt Bierner
40b8c9d073 Allow _ in markdown word definitions 2019-11-14 15:35:46 -08:00
Matt Bierner
0491afb85e Update md version 2019-11-09 12:52:27 -08:00
Matt Bierner
b10335675f Improve scroll sync for nested markdown lists
Fixes #83735
2019-11-08 18:13:01 -08:00
Matt Bierner
cbd414ba58 Don't force refresh the markdown preview's html when changing the active document 2019-11-08 17:00:56 -08:00
Matt Bierner
979e2b0387 Remove duplicate call to dispose 2019-11-08 16:56:06 -08:00
Matt Bierner
8236f06bfc Add experimental webview editor based markdown preview
Potentially for #54776, #2766
2019-11-08 10:38:51 -08:00
Matt Bierner
43a2ca8840 Remove forceUpdate property 2019-11-08 10:38:51 -08:00
Matt Bierner
1cdb534185 Try to redeuce duplication for create vs refactor 2019-11-08 10:38:51 -08:00
Matt Bierner
886ea7a8b4 💄 2019-11-08 10:38:51 -08:00
Matt Bierner
aafc307dd8 Use set to store preview instead of array 2019-11-08 10:38:51 -08:00
Matt Bierner
884d52f1e7 Extract DynamicPreviewStore 2019-11-08 10:38:51 -08:00
Matt Bierner
7ee9aa4757 Rename and move types around to get ready for webview editor based previews 2019-11-08 10:38:51 -08:00
Alex Dima
c9a2de2d9c Improve integration test output on Windows (#84239) 2019-11-08 17:21:35 +01:00
Matt Bierner
45a64e2bdd Improve markdown scroll sync on fenced code blocks in md files 2019-11-02 15:28:01 -07:00
Matt Bierner
37753d5bbc Update deps 2019-11-02 15:28:01 -07:00
Benjamin Pasero
ca22de4b17 debt - bump node.d.ts dependency in extensions to 12.x (part of #82514) 2019-10-28 08:11:47 +01:00
Benjamin Pasero
e5f0077f40 css 💄 2019-10-25 16:41:56 +02:00
Matt Bierner
78559bf9e6 Normalize vscode links in markdown files to target current vscode version
Fixes #71622

This allows you to use generic `vscode` links inside the markdown preview and still have them work if the preview is viewed in insiders
2019-10-23 20:27:52 -07:00
ganxy1028
5c705ea7ee Fix #82199, resetting some color of code blocks at Markdown Preview with light theme (#82453)
* Fix #82199 

This PR resets color theme of number, title and built_in at Preview with light theme.

* Bad whitespace indentation Fixe

* owner comment Removed
2019-10-15 13:12:11 -07:00
Matt Bierner
ecdba243ff Treat non-spacing marks as part of word in md files
Fixes #82386
2019-10-14 15:59:41 -07:00
Jakob Fahr
9f2ca57b05 Fix #82199, numbers hard to read in light theme markdown preview (#82450) 2019-10-14 11:47:53 -07:00
Matt Bierner
acdbc65fcc Update highlight js and md versions 2019-10-12 20:14:07 -07:00
Matt Bierner
21ba436c51 Fix one more case of #81320
The markdown link people write may be uri encoded. We need to decode these before trying to open them
2019-10-09 13:01:30 -07:00
Johannes Rieken
32b2861498 workaround - remove as const to make webpack happy... 2019-10-07 14:17:39 +02:00
Matt Bierner
8e944be15c Support jsonc for code block type with highlightjs 2019-10-04 17:57:33 -07:00
Matt Bierner
36aa903d5a Rewrite how we handle links in the md preview
Try to simplify how we resolve links:

- Move most logic out of the preview itself.
- Simplify the amount of rewriting we do in the markdown engine
2019-10-04 17:57:33 -07:00
Matt Bierner
ef698fa6cd Make markdown refresh more stable
Fixes #80680

- Always sync the current preview line number with the editor, even when `scrollEditorWithPreview` is false

- If the md file is focused and refresh is called, do not try resetting the current line to match the editor file. This mainly effects the case where `scrollEditorWithPreview` is false
2019-10-03 13:46:31 -07:00
Matt Bierner
2235ebf5db Handle new vscode-resource format for md linkes
Fixes #81849

This is a safer scoped fix, not the best one. Will look into removing most of this uri munging for october
2019-10-02 14:09:38 -07:00
Matt Bierner
8f6108beea Removing unused .mac style rule for rendered markdown 2019-09-19 16:26:33 -07:00
Konstantin Solomatov
316fd807fe remove docIndex in markdown language extension (#80933) 2019-09-16 10:50:20 -07:00
Johannes Rieken
9aab002dea push workaround for ts-loader weirdness 2019-09-12 09:59:31 +02:00