Matt Bierner
f17b33faf2
Use .?method() in more places ( #152112 )
...
Switches simple patterns like:
```ts
if (some.thing) {
some.thing.method();
}
```
to:
```ts
some.thing?.method()
```
This is more concise and avoids having to repeat the `some.thing` part
2022-06-15 16:28:31 +00: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
Matt Bierner
e7b3724e0c
Enable no-case-declarations in codebase ( #139243 )
...
Fixes #139236
This can catch tricky programming mistakes that cause a runtime error. See 7e266b2c42 as an example of the type of bug this can prevent
2021-12-15 17:15:35 -08:00
Matt Bierner
913639f42a
Strip meta http-equiv tags from webview content updates
2021-12-14 11:53:49 -08:00
Matt Bierner
71f615b105
Also compare other attributes for md preview updates
...
Fixes #136816
2021-11-10 14:13:41 -08:00
Matt Bierner
c11a9ce097
Better update of line numbers
2021-11-04 14:34:49 -07:00
Matt Bierner
4d50e586ec
Improve morphing for vscode-docs
2021-11-03 20:54:20 -07:00
Matt Bierner
fbc1f7df91
Fire event when md content is updated
...
For #136255
2021-11-01 17:41:39 -07:00
Matt Bierner
8f672cac62
Use morphdom to reduce number of full page updates to md preview
...
This should help improve scroll sync and also reduce the number of times we go out to the network if images are in the preview
2021-11-01 15:33:00 -07:00
Matt Bierner
92418e0ea0
Remove usage of non-standard setImmediate
...
This was broken after upgrading to webpack5
2021-07-06 12:42:27 -07:00
Matt Bierner
b8f11107f7
Use @types/vscode-webview
2021-05-27 13:41:38 -07:00
Matt Bierner
119581fc2a
Use more standard name for shared extension tsconfig
...
This enables Intellisense in the `tsconfig.base` file
2021-04-12 15:58:38 -07:00
Matt Bierner
d5f4e119e0
Use Array.from's map directly instead of a second call to map
2021-04-12 14:42:39 -07:00
Takashi Tamura
a34e751b01
Fix scrolling of markdown preview. Close #65504 ( #111094 )
...
* Fix scrolling of markdown preview.
* Use scrollDisabledCount.
* Stop initializing scrollDisabledCount.
* Make scrollTo enough large to occur scroll events.
* Should resolve when the error event occurs.
2021-01-14 17:24:08 -08:00
Matt Bierner
731f9c2563
Prefer using data-href if it exists on a markdown preview link
...
Fixes #101203
2020-07-23 21:51:18 -07:00
Matt Bierner
7099dc0708
Add extra check to markdown state
...
Possibly for #102733
Tries to get users out of a potential bad state where the state was being stored as a string. Only insiders users should have hit this
2020-07-16 16:27:42 -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
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
Matt Bierner
b10335675f
Improve scroll sync for nested markdown lists
...
Fixes #83735
2019-11-08 18:13:01 -08: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
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
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
7226e32d1b
Use shared tsconfig for markdown preview
...
Fixes #80121
2019-09-09 10:20:56 -07:00
Salvador Cabrera
34339f92c4
Fix: Markdown Preview scroll remains same after clicking on some other link #78465
...
Improves the behavior on how markdown preview behaves when clicking a link
2019-08-19 09:35:06 -05:00
Matt Bierner
7f3d3d835f
Add vscode.env.webviewResourceRoot api
...
Fixes #72155
Adds a constant to the api that tracks the root path for resources inside of webviews. This is required because we will not be able to use `vscode-resource:` uris on the web. Our current approach is to rewrite the html we are given but there are almost certainly going to be cases where we don't get this quite right.
Adopts the new api for the markdown preview
2019-06-18 22:29:37 -07:00
Matt Bierner
003521e715
Fix markdown preview restoring to wrong position on restart
2019-02-14 18:24:01 -08:00
Matt Bierner
5cc00861fc
Enable no-var-keyword tslint rule
2019-01-03 18:02:48 -08:00
Matt Bierner
cba84fba5e
Take progress within element into account for markdown scroll sync
...
Fixes #65504
2019-01-02 14:36:16 -08:00
Matt Bierner
907924abc0
Reveal absolute top of markdown preview when scrolling to line 0
...
Fixes #61816
2018-10-25 11:57:50 -07:00
Matt Bierner
fe63c7e2f2
Reveal line 0 in editor when markdown preview scrolls to top
...
Fixes #61815
2018-10-25 11:57:50 -07:00
Matt Bierner
a101ececf4
Remove onCommand from markdown preview
2018-09-21 15:08:41 -07:00
Matt Bierner
7185906189
Reduce usage of postCommand in markdown preview
2018-09-21 15:08:41 -07:00
SteVen Batten
f8f4d3af30
improve markdown preview scroll sync ( #58852 )
...
* improve markdown preview scroll sync
2018-09-18 15:08:37 -07:00
Matt Bierner
21ee81c03b
Working on webview persistence API
...
#49022
2018-05-14 10:34:59 -07:00
Matt Bierner
82d97b4c3c
Add acquireVsCodeApi to get handle to vscode api inside webview
...
Fixes #48540
2018-04-25 22:28:31 -07:00
Matt Bierner
f36cae36dc
Add vscode namespace in webview
...
From discussion around #48540
2018-04-25 15:33:45 -07:00
Matt Bierner
9755b46bf6
Fix double click markdown editor when in split view
...
#47188
2018-04-05 10:16:39 -07:00
Matt Bierner
468dc867cd
Rename markdown to markdown-language-features
2018-03-19 21:08:39 -07:00