Matt Bierner
0b3574dcef
Update id of markdown-it renderer ( #153876 )
...
Fixes #153873
2022-06-30 23:19:49 +00:00
Matt Bierner
e44361365e
Don't include reference links that are inside other links ( #153864 )
...
Fixes #150921
2022-06-30 15:43:31 -07:00
Matt Bierner
bbce24d8bb
Handle fs error in markdown path completions ( #153869 )
...
Fixes #153867
2022-06-30 22:32:32 +00:00
Matt Bierner
e13feea6ae
Only compute diagnostics for opened md files ( #153395 )
...
* Only compute diagnostics for opened md files
For #152494
* Make tests stable for result ordering
2022-06-27 15:55:38 -07:00
Matt Bierner
fc709e2d35
Use more standard values for scheme constants ( #153367 )
...
This drops the `:` from the scheme constants as it was easy to misuse this
2022-06-27 22:35:17 +02:00
Matt Bierner
da0f64881a
Dispose in markdown tests ( #153345 )
...
Updates the markdown tests to dispose of disposables created during the test
2022-06-27 15:52:59 -04:00
Matt Bierner
d1b4630a50
Fix Markdown tests on windows ( #153212 )
...
Fix windows tests
2022-06-25 18:59:25 +02:00
Matt Bierner
3b549009fe
Markdown path completions tests use mocked out fs ( #153045 )
...
* Markdown path completions tests use mocked out fs
This updates the path completion tests to stop depending on the actual fs and instead use `IMdWorkspace`
* Update remaining tests
2022-06-24 23:01:24 +00:00
Matt Bierner
64305a732e
Better handling of text/uri-list in built-in extensions ( #153163 )
...
- When splitting `text/uri-list`, we should split on `\n` to handle against spec versions of `text/uri-list`
- However when constructing a `text/uri-list`, we should use `\r\n` to align with the spec
2022-06-24 15:24:16 -07:00
Matt Bierner
7fd834b64f
Enable angle bracket path completions in markdown ( #153158 )
...
Fixes #152510
2022-06-24 15:04:40 -07:00
Matt Bierner
8acfd0ae60
Exclude empty links from md results ( #153161 )
...
These are technically valid links but we don't care about them since they take up no space
2022-06-24 21:42:00 +00:00
Matt Bierner
00ad6bc3d4
Markdown document links should reveal cell in notebook ( #153147 )
...
Fixes #141024
2022-06-24 15:49:15 -04:00
Matt Bierner
d6497d3db1
Use ResourceMap ( #153051 )
...
Replaces `Set` of uris with a `ResourceMap`
2022-06-24 01:00:05 +00:00
Matt Bierner
9b7696cc9c
Fix notebook links to other docs in edited markdown cells ( #153052 )
...
Fixes #148199
This makes us resolve links in notebooks relative to the notebook document instead of relaitve to the cell
2022-06-23 20:55:08 -04:00
Matt Bierner
ab7bc9fb0b
Split up MD link tests ( #153048 )
...
This splits the markdown link tests in two:
- Tests for detecting links in md files (`MdLinkComputer`)
- Tests for the actual vs code editor link provider
Also fixes a few cases splitting these tests up caught
2022-06-23 17:53:56 -07:00
Logan Ramos
4a7a6a597a
Update extension telemetry modules ( #153057 )
2022-06-24 00:53:23 +00:00
Matt Bierner
385bf5036b
Optimize NoLinkRanges lookup ( #153010 )
...
This switches us to use a map to check if a position exists inside the no link ranges
2022-06-23 11:38:13 -07:00
Matt Bierner
07144d22c4
Rename types in the markdown extension ( #152905 )
...
Renames in the markdown extension
This renames some types and splits up some files as part of an exploration towards a proper LSP. Changes:
- `SkinnyTextDocument` -> `ITextDocument`
- Moved `ITextDocument` to own file
- `MdWorkspaceContents` -> `IMdWorkspace`
2022-06-22 14:12:48 -07:00
Matt Bierner
be1ee5d9f1
Re-validate md files when a linked to file is created or deleted ( #152520 )
2022-06-22 19:02:46 +00:00
Matt Bierner
321423db2b
Standardize text/uri-list handling ( #152756 )
...
This creates a common set of functions for creating and parsing the `text/uri-list` mime type. As part of this, I also aligned us with the standard, which uses `\r\n` between lines instead of just `\n`
2022-06-22 13:53:37 +02:00
Matt Bierner
5437480941
Enable md paste actions by default ( #152810 )
...
Turns on pasting of links for easier testing. However `editor.experimental.pasteActions.enabled` is still off by default so this won't be enabled by default
2022-06-22 08:19:52 +02:00
Matt Bierner
c84655d123
Reduce recomputation of state in markdown extension ( #152804 )
...
* Reduce recomputation of state in markdown extension
- Use `getForDocument` more often to avoid refetching documents
- Debounce `MdTableOfContentsWatcher`. We don't want this to trigger on every keystroke :)
* Cache LinkDefinitionSet
* Add test file change
* Fix toc watcher for tests
2022-06-21 16:25:10 -07:00
Matt Bierner
389aa8a935
Fix MdDocumentInfoCache computing values twice ( #152799 )
...
* Fix MdDocumentInfoCache computing values twice
Fixes a race where values could be computed twice before being cached
* Remove only
2022-06-21 16:22:07 -07:00
Matt Bierner
d5a75f2ceb
Add logging for MD language features ( #152792 )
...
This verbose logging will help track down inefficient calling patterns (such as recomputing stuff)
2022-06-21 14:18:36 -07:00
Matt Bierner
bbe7b54cf4
Remove custom editor tests ( #152777 )
...
These tests are not actively being run or maintained. Removing them for now
2022-06-21 15:37:19 -04:00
Matt Bierner
fa53aa6fec
Cleanup pass for md extension ( #152760 )
...
Clean up names in md extension
2022-06-21 15:36:32 -04:00
Matt Bierner
2249b171f4
Reduce number of times MD docs are re-tokenized ( #152674 )
...
This change reduces the number of times we retokenize a markdown file by doing the following:
- Use `MdTableOfContentsProvider` in more places
- Introduce a `IMarkdownParser` interface that lets us drop in a caching version of the tokenizer
2022-06-21 08:43:01 +02:00
Matt Bierner
369252a027
Skip diagnostics for non-open md files ( #152687 )
...
Currently we only show diagnostics for opened tabs. This means we shouldn't waste time computing diagnostics for these non open files
2022-06-20 16:39:01 -07:00
Matt Bierner
0bc3109761
Don't try parsing non-markdown files ( #152661 )
...
This fixes our references and rename provider to not try parsing non-markdown files as if they were markdown
2022-06-20 10:44:50 -07:00
Matt Bierner
4c72dedb4a
Optimize markdown workspace scanning ( #152563 )
...
* Optimize markdown workspace scanning
- Adds cache for markdown file
- Avoid reading non-markdown files from disk (when we expect markdown files)
- Use `range.contains(pos)` instead of `range.intersects(range)`
* Don't remove cached document on change
We only want to invalidate the cached document when it is first opened (since the cached version is the one from disk). Otherwise we can use the live version of the doc
2022-06-19 09:40:10 -07:00
Matt Bierner
5a175207de
Improve markdown link regexp ( #152533 )
...
* Improve markdown link regexp
This makes the markdown link regexp more readable and also combines the two regular expressions we were running
* Fixed backtracking
2022-06-19 06:25:54 +02:00
Matt Bierner
78597fd026
Don't hardcode use of github slugifier ( #152507 )
...
Use `engine.slugifier` for this instead
2022-06-17 17:25:54 -04:00
Matt Bierner
dea813ff7c
Add table of contents provider abstraction ( #152504 )
...
We currently re-compute the same table of contents for markdown files multiple times. This is because multiple language features all need table of contents
With this change, we introduce a new `TableOfContentsProvider` which maintains a cache of the table of contents per file. This provider is then passed into every caller that needs a toc
2022-06-17 18:20:02 +00:00
Matt Bierner
623f55f437
Refactor markdown language features ( #152402 )
...
(sorry for the size of this PR)
This change cleans up the markdown language features by making the following changes:
- Use `registerXSupport` public functions to register these
- Expose the slugifier the `MarkdownEngine` uses. You never want to use a different one if you already have a markdown engine
- Sort of clean up names. I'd introduced a bunch of confusing names while iterating in this space. What I'm working towards:
- `Computer` — Stateless thing that computer data
- `Provider` — Potentially stateful thing that provides data (which may be cached)
- `VsCodeProvider` — The actual implementation of the various vscode language features (which should only be used by VS Code and in tests, not shared with other features)
- Introduce `MdLinkProvider` to avoid recomputing links for a given document. Also use this to hide more internals of link computation
2022-06-17 10:25:52 +02:00
Matt Bierner
afe316c08c
Add diagnostic manager enablement change tests ( #152392 )
...
* Add test for MD diagnostic manager config changes
Add a simple test the enabling/disable diagnostics should make the diagnostic manager recompute diagnostics
* Add `.get`
2022-06-16 15:53:19 -07:00
Matt Bierner
cb5fa75d11
Clean up markdown diagnostic tests ( #152374 )
...
* Clean up markdown diagnostic tests
This splits the diagnostic compute tests from the test for the diagnostic manager
* Mark internal field as private
2022-06-16 22:33:11 +02:00
Matt Bierner
3114ee690b
Split out VS Code reference provider from markdown reference provider ( #152369 )
...
This change renames the main markdown reference provider class to `MdReferenceComputer` and then uses this to implement a `vscode.ReferenceProvider`
This more cleanly splits the VS Code part of the logic from the general reference calculation stuff other providers consume
2022-06-16 15:47:48 -04:00
Matt Bierner
6c252851f2
Revalidate linked files on header change ( #152366 )
...
Fixes #150945
With this change, when the headers in a file change, we should also try to revalidate all files that link to it
2022-06-16 18:14:01 +00:00
Matt Bierner
4fc5d76213
Fix ranges and validation setting for MD own path + header links ( #152270 )
...
* Fix ranges and validation setting for MD own path + header links
Previously for a `file.md`, links to headers in that file that use paths, such as `[link](./file.md#some-header)` were validated using `markdown.experimental.validate.fragmentLinks.enabled`
This is confusing as that setting was only meant to be used for links such as`[link](#some-header`). It also resulted in the diagnostic having the incorrect range
This change instead makes these links be validated by `markdown.experimental.validate.fileLinks.markdownFragmentLinks`
* Fix compile
2022-06-15 20:02:41 -07:00
Matt Bierner
a765abcf07
Adopt ResourceMap for MD diagnostics ( #152264 )
...
Adopt ResourceMap
Switches to use `ResourceMap` instead of our own implementation
2022-06-15 15:43:09 -07:00
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
Matt Bierner
354e1a0595
Finalize data file reading API ( #152127 )
...
Fixes #147481
Also reverts #150963 since the `kind` field is not being finalized
2022-06-15 07:56:02 -07:00
Matt Bierner
00273730e8
Split markdown linkComputer from linkProvider ( #152124 )
...
Instead of passing around a full `vscode.DocumentLinkProvider`, we should pass just the more minimal interface that consumers need
2022-06-14 15:34:05 -07:00
Matt Bierner
00574df08a
Remove extra path
field in FileLinksData
( #152004 )
...
Remove extra `path` field
This field is no longer needed after we switched to use `ResourceMap` vs `Map`
Also inlines the `FileLinksData` type def
2022-06-14 08:01:53 -07:00
Matt Bierner
a658c04b0a
Adjust md external header link diagnostic range ( #152001 )
...
Fixes #151998
Makes errors for invalid headers on file links only cover the fragment range instead of the entire link range
2022-06-14 09:39:49 +02:00
Matt Bierner
1a07fd15d7
Clarify markdown validate settings ( #151997 )
...
Clairify markdown validate settings
Fixes #150949
- Rename headerLinks -> fragmentLinks
- Add new `fileLink.markdownFragmentsLinks` to validate the headers on fragment links (inherits the default setting value from `fragmentLinks`)
2022-06-13 17:06:28 -07:00
Matt Bierner
7284c3e4c1
Use classes for drop/paste edit types ( #151980 )
2022-06-13 13:10:07 -07:00
Johannes
ed9ed45794
Merge branch 'main' into joh/voluminous-lobster
2022-06-10 09:07:30 +02:00
Babak K. Shandiz
a8de8e2112
[markdown] Ignore brackets inside link text ( #151610 )
...
* 🔨 Allow texts in bracket pairs inside link titles; [text](link)
Signed-off-by: GitHub <noreply@github.com>
* 🔨 Allow texts in bracket pairs inside link titles; [text](<link>)
Signed-off-by: GitHub <noreply@github.com>
* ⚗️ Add tests to verify link titles can include bracket pairs
Signed-off-by: GitHub <noreply@github.com>
2022-06-09 11:48:50 -07:00
Johannes
3622010b64
Merge branch 'main' into joh/voluminous-lobster
2022-06-09 09:08:20 +02:00
Matt Bierner
d7c90c2b2b
Update text editor drop proposal ( #151552 )
...
This updates the text editor drop proposal (#142990 ). This change introduces `DocumentDropEdit` which removes the need for `SnippetTextEdit`. This interface may also be extended in the future with additional metadata
2022-06-08 17:44:28 -04:00
Matt Bierner
48cfaa2187
Fix rename of paths in markdown reference link definitions ( #151545 )
...
Fixes #151117
2022-06-08 19:20:17 +00:00
Matt Bierner
370dfd5fee
Iterate on paste edit provider api ( #151477 )
...
* Iterate on paste edit provider api
For #30066
- Pass all selections to paste providers. For #151326
- Introduce `DocumentPasteEdit` as return type. This new type uses an `insertText` that is applied to every paste location (for multicursor), plus an optional additional edit
- Add `DocumentPasteProviderMetadata`. This lets extensions tell us which types of mimetypes they are interested in, letting us avoid round trips if no extensions care about the pasted data
* Correctly batch insertText
2022-06-08 15:06:55 -04:00
Johannes
0656d21d11
auto-fixed prefer-const violation
2022-06-08 17:49:21 +02:00
Matt Bierner
1327d1eb50
Adopt ResourceMap in more places ( #151475 )
...
This changes switches to use the new `ResourceMap` type in more places in the markdown extension where we need to have a map/set with uris as the key
2022-06-08 08:34:06 +02:00
Matt Bierner
60a68d666d
Add resourceMap helper for markdown extension ( #151471 )
...
This change introduces a `ResoruceMap` map type that is essentially `Map<vscode.Uri, T>`
It also fixes a potential race condition with `MdWorkspaceCache` where two quick calls would both trigger init
2022-06-07 18:00:10 -07:00
Matt Bierner
9545af80f6
Fix markdown link detection for links with titles ( #151459 )
...
Fixes #151458
2022-06-07 20:58:29 +00:00
Justin Chen
bcc7ffae3e
bugfix on markdown underlines, addressing part of issue #136073 ( #151178 )
...
Co-authored-by: Justin Chen <t-justinchen@microsoft.com>
Co-authored-by: Matt Bierner <matb@microsoft.com>
2022-06-06 17:35:41 +00:00
Logan Ramos
70647a2ffd
Fix #150041 ( #151108 )
2022-06-02 11:02:26 -04:00
Matt Bierner
e44f4ba886
Add experimental tag to experimental extension settings ( #151031 )
...
This makes a few more extension settings with the `experimental` tag so that show up if you search `@tag:experimental`
2022-06-01 16:32:58 -07:00
Matt Bierner
9302343e8e
Also ignore star checkboxes ( #151029 )
...
Fixes #150672
This makes our md link detection also ignore checkboxes like `* [x]` instead of just `- [x]`
2022-06-01 21:23:29 +00:00
Matt Bierner
7477efd87e
Better message for markdown reference links ( #151018 )
...
Fixes #151017
Also improves the diagnostic message for invalid reference links to make it clear we are talking about a missing link definition
2022-06-01 19:01:36 +00:00
Matt Bierner
e6fff5ecff
Don't parse checkboxes are links in markdown ( #150914 )
...
Fixes #150672
2022-05-31 14:57:32 -07:00
Matt Bierner
e4f7f6a9da
Add PasteEditProvider ( #107283 )
...
For #30066
This adds a new `documentPaste` api proposal that lets extensions hook into copy and paste.
This can be used to do things such as:
- Create link when pasting an image
- Bring along imports when copy and pasting code
2022-05-25 12:27:58 +02:00
Matt Bierner
1c7991f1e8
Markdown ignoreLink should apply to paths in header links ( #150223 )
...
This change lets you ignore all links to a given file, even if those links include a header. For example: `[text](/path/to/file#some-header)` can be ignored using `/path/to/file`
2022-05-23 17:07:15 -07:00
Matt Bierner
b8420578fd
Add additional allowed tags in untrusted notebook markdown ( #150228 )
...
This adds some extra allowed tags when rendering markdown in notebooks. Additions are:
```
"b",
"br",
"caption",
"center",
"col",
"colgroup",
"details",
"em",
"font",
"i",
"kbd",
"sub",
"summary",
"sup",
"table",
"tbody",
"tfoot",
"thead",
"td",
"th",
"tr",
"tt",
"u",
"video"
```
2022-05-23 22:30:42 +00:00
Matt Bierner
96cae45ba9
Rename skipPaths to ignoreLinks ( #150064 )
...
This change renames the experimental skipPaths setting to ignoreLinks. This setting applies to all types of links, and can also be used to ignore links to headers
2022-05-20 22:54:21 +00:00
Esteban Dalel R
e76ad21903
Fix typo ( #150042 )
2022-05-20 19:06:35 +00:00
Matt Bierner
993c36c920
Fix markdown ext errors accessing disposed webview ( #149960 )
...
When reloading windows that need to restore a markdown preview, sometimes I'll see an error when the markdown preview tries accessing a disposed of webview. This seems to be cause caused by `provideTextDocumentContent`, where we end up disposing of the webview before an `await` resumes execution
2022-05-20 09:17:57 -07:00
Matt Bierner
0d55d50173
Expose outputItem in notebook markdown eve ( #149870 )
...
For #121256
This change adds the current `ouputItem` to the notebook markdown renderer's environment
Renders that extend our markdown renderer can use this to access output item metadata for example
2022-05-18 16:14:32 -07:00
Matt Bierner
27903c28aa
Remove unfinished test ( #149864 )
...
Mistakenly checked this in
2022-05-18 16:01:28 -07:00
Matt Bierner
daf0d5e551
Add skipPaths option for markdown link validation ( #149859 )
...
The new `markdown.experimental.validate.fileLinks.skipPaths` setting lets you specify a list of paths (as globs) that should not be validation
This is useful since markdown is used in a range of environments, and sometimes you may need to link to paths that don't exist on disk but will exist on deployment
A few other changes here:
- Adds a quick fix that adds paths to `skipPaths`
- Rename existing settings to use the `.enabled` prefix
2022-05-18 14:37:08 -07:00
Matt Bierner
1c7ab35761
Rename to DocumentOnDropEditProvider ( #149730 )
...
This change renames `DocumentOnDropProvider` to `DocumentOnDropEditProvider`. This new name aligns with the existing `DocumentFormattingEditProvider`
2022-05-17 09:26:54 -07:00
Matt Bierner
c2b064538b
Don't detect links in markdown code blocks ( #149680 )
...
Fixes #149678
2022-05-16 17:35:16 -07:00
Matt Bierner
d71f6ec0d9
Update markdown diagnostics when linked files change ( #149672 )
...
For #146303
This PR updates the markdown diagnostic reporter to watch linked to files. If one of these linked to files is created or deleted, we recompute the diagnostics for all markdown files that linked to it
2022-05-16 17:30:39 -07:00
Matt Bierner
dd9dca9825
Fixing some html tags detected as autolinks for diagnostics ( #149511 )
...
For markdown such as `<scope:tag>b</scope:tag>`, we currently detect `<scope:tag>` as an uri (an autolink) and then try validating it as a file path
This change doesn't fix `<scope:tag>` being detected as a link (which is actually correct if there isn't closing html), but does fix the us trying to validate it by marking the uri as external
2022-05-16 12:19:29 +02:00
Matt Bierner
113287ccc3
Don't treat escaped markdown reference links as links ( #149407 )
...
Fixes #149406
Make sure that escaping the leading `[` of a reference link means it is not considered a link
- Picks up new grammar with fixes
- Updates our document link provider to also not consider these as link
2022-05-12 19:35:36 -07:00
Matt Bierner
a075453e55
Clean up the markdown document link provider tests ( #149405 )
...
- Use `joinLines` instead of
- Inline document text
- Always use `example.com`
- Move issue numbers into test titles
- Clean up text
2022-05-12 16:01:51 -07:00
Matt Bierner
5485b8e215
Include "
and '/' as puctuators for slugify ( #149404 )
...
We already include `'` and `/` makes sense to treat as a puctuator too for titles such as `# do A / B`
2022-05-12 15:56:25 -07:00
Matt Bierner
9e42783398
Don't repeat markdown link validation ( #149169 )
...
We currently validate each link in a markdown file individually. This means that if there are multiple links to the same file, we check if that file exists multiple times
With this change, we instead will check that the file exists once and then use this to add diagnostics for all the links to it. This is done by introducing a new `FileLinkMap` which maps file paths to links within that file
2022-05-10 09:14:40 -07:00
Matt Bierner
d850919250
Adds cancellation to md diagnostic computer ( #149122 )
...
This tracks inflight diagnostic computation and tries to cancel them if a new request comes in for the same document (usually because the document has changed or has been closed)
2022-05-09 15:42:32 -07:00
Matt Bierner
a6dd083a7e
Use /
for md paths, even on windows ( #149120 )
...
Fixes #149010
2022-05-09 15:22:44 -07:00
Matt Bierner
04ecb1d42f
Normalize markdown links in notebooks ( #148827 )
...
Fixes #146352
This ensures we pass links in markdown cells through the same normalization function we use to assign headers ids
2022-05-05 18:33:38 +00:00
Matt Bierner
c08941b87c
Ignore bulkedit previews for markdown references / renames ( #148744 )
...
Makes sure we don't pick up the fake documents created by the bulkedit-preview
2022-05-04 16:03:35 -07:00
Matt Bierner
9dab79d9c8
Fix markdown web extensions ( #148739 )
...
We're currently importing a file from `test/util`, which is not supported on web. Move the noop cancellation token into the `util` folder instead
2022-05-04 14:02:38 -07:00
Matt Bierner
93fd393a0e
Add API proposal for reading files in data transfer ( #148596 )
...
* Add experimental support for reading files in data transfer
Adds a new `DataTransfer.asFile` method which lets you get file objects from a `DataTransfer`. This is currently only hooked up for drop into editors.
A few follow ups:
- Right now the file data is also read eagerly when it is transfered to the extension host. Before shipping this we would make this happen lazily instead
- The drop into editor api does not provide a nice way to do anything with the dropped files.
We should at least support returning a `WorkspaceEdit`. However `WorkspaceEdit` only supports text files, so we would also need to add an API that lets it deal with binary files
* Make `asFile` return a value instead of a promise
`asFile().data()` already returns a promise so `asFile` doesn't also need to be async
* Trying resolving data files transfer lazily
* Cleaning up code for lazy drop
* Remove testing code
* Remove unneeded buffer serialize
* 💄
2022-05-04 12:59:27 -07:00
Matt Bierner
eba8ef0547
Add diagnostics for markdown links ( #148578 )
...
* Initial work on md link diagnostics
* Adding settings to enable/disable validation
* Add delay for recomputing diagnostics
* 💄
* Split test on diagnostics compute vs management
* Validate on file open
* Remove dianostics on file close
* Allow paths to folders
* Add validation configuration option
2022-05-02 16:06:00 -07:00
Matt Bierner
e3e4bfacc3
Remove blank
2022-05-02 15:50:41 -07:00
Jean Pierre
44e644467d
Enable go to definition for markdown links ( #148017 )
...
* Enable go to definition for markdown links
* Add markdown definitionProvider tests
2022-05-02 10:07:40 -07:00
Yuki Hattori
82ad6afd36
Fixes microsoft/vscode#147936 ( #148503 )
...
By changing output esbuild setting for Markdown preview scripts to iife,
prevents global namespace pollution and reduces possibility of breaking
the preview by contributions from other extensions.
2022-05-02 09:33:51 -07:00
Matt Bierner
892d6ec2a2
Fix md workspace cache for untitled files
...
Makes sure we also add all text documents to the list of md docs
2022-04-30 20:15:40 -04:00
Matt Bierner
8449a9f5cb
Fix md rename when file does not exist
...
Fixes #148147
- Don't try renaming non-existent files
- Also fixes a bug where renaming in untitled files would insert `untitled:`
2022-04-30 19:52:44 -04:00
Matt Bierner
3e182633c7
Adding some more tests for markdown references
2022-04-30 19:14:03 -04:00
Matt Bierner
c41728c479
Fixes #147896 ( #148101 )
...
* Fixes #147896
* Replace all
* Fix windows slash check
* Skip test on windows for now
2022-04-26 15:45:15 -04:00
Benjamin Pasero
72b4be55fa
skip markdown rename tests ( #147896 )
2022-04-22 08:07:49 +02:00
Matt Bierner
59b6227bf3
Use un-encoded file paths are rename placeholder
2022-04-21 22:23:53 -04:00
Matt Bierner
7b1168660a
Fix resolving of links on rename
...
We should resolve relative to the file the rename is triggered in
2022-04-21 22:23:53 -04:00
Matt Bierner
62eebab685
Use uri instead of string
2022-04-21 22:23:52 -04:00
Matt Bierner
b438e8438d
Fixing rename to use correct file paths relative to containing files
2022-04-21 22:23:52 -04:00
Matt Bierner
0610f195fb
Try automatically adding .md file extension to new paths on rename
2022-04-21 22:23:51 -04:00
Matt Bierner
0ac39e800d
Add support for renaming files in markdown using F2
...
This lets you trigger F2 on a file path in a markdown link to both rename the file and also update all references to it
2022-04-21 22:23:51 -04:00
Matt Bierner
9fbd962973
Differentiate md refs request on file path vs on fragment
2022-04-21 22:23:50 -04:00
Matt Bierner
800eec5645
Mark setting as experimental again
...
Will finalize along when we actually ship this api
2022-04-19 13:08:47 -07:00
Matt Bierner
08e838cba3
Don't encode paths
2022-04-19 10:13:38 -07:00
Matt Bierner
cba0a0e460
Always encode paths dropped in md
2022-04-14 14:55:22 -07:00
Akat
b499467f9f
fix(markdown): avoid considering link references/sources in code sections ( #146826 )
2022-04-07 14:50:37 -07:00
Matt Bierner
bba6c56123
Fix dropping image from webpage into markdown files
2022-04-06 14:27:41 -07:00
Matt Bierner
27759c6e03
Use limiter instead of custom batcher
2022-04-06 14:16:06 -07:00
Matt Bierner
62d6f38fc2
Auto create image links when dropping an image file into markdown
2022-04-05 15:42:56 -07:00
Matt Bierner
032ee47056
Add setting to enable/disable markdown drop into editor
...
For #142990
2022-04-05 15:42:56 -07:00
Matt Bierner
b4b7380576
Fix md references not checking authority
...
Simply compare by string for now
2022-04-05 15:31:43 -07:00
Matt Bierner
a56c9f10b7
Enable find all references and rename of auto links and http(s) links in markdown
...
For #146777 , #146277
2022-04-05 15:18:18 -07:00
Matt Bierner
c80acef8a1
Mark cached prop readonly
2022-04-05 15:18:17 -07:00
Matt Bierner
55627db338
Move fragment range down into documentLinkProvider
2022-04-05 14:22:57 -07:00
Matt Bierner
9b141e1959
Use clearer logic
2022-04-05 14:22:57 -07:00
Matt Bierner
2154f3d008
Pass through CancellationToken
2022-04-05 11:56:40 -07:00
Matt Bierner
0496c2b3a7
Add basic file references provider for markdown
...
Fixes #146267
2022-04-05 11:56:40 -07:00
Matt Bierner
d0767451a9
Adding test for renaming the definition itself
2022-04-04 15:56:29 -07:00
Matt Bierner
7831ff6a32
Reuse references in rename requests
2022-04-04 15:56:29 -07:00
Matt Bierner
baa7434480
Use header text as placeholder for md rename
...
For #146291
2022-04-04 15:56:28 -07:00
rebornix
024e40fb31
💄
2022-04-04 14:20:07 -07:00
rebornix
ab2a987919
fix #146750 .
2022-04-04 14:19:15 -07:00
Matt Bierner
44ffeba237
Switch to provider based model for on drop
...
This simplifies implementing the provider and also give potentially gives us more control over how the drop happens
2022-04-01 15:51:38 -07:00
Matt Bierner
5451119820
Adopt SnippetTextEdit for drop
2022-04-01 15:51:38 -07:00
Matt Bierner
ca267e3f5e
Error on rename in bare file links in definition
2022-04-01 11:15:24 -07:00
Matt Bierner
114b340f7a
Fix explicit references to own file
2022-04-01 11:15:24 -07:00
Matt Bierner
8b7086afdb
Fixing false positive ref link being detected
2022-03-31 19:09:14 -07:00
Matt Bierner
c39d09a4c0
Working on initial support for renaming refs in md
...
For #146291
2022-03-31 18:28:23 -07:00
Matt Bierner
6b573340bd
Fixing references on header when looking at file extensions
2022-03-31 15:31:41 -07:00
Matt Bierner
8a6a300216
Simplify code for dealing with link definitions
2022-03-31 15:11:35 -07:00
Matt Bierner
57dffde3d4
Trying to clean up md link structure by moving defintion up a level
2022-03-31 15:11:35 -07:00
Matt Bierner
0e65adbda8
Initial work on rename in markdown
...
For #146291
Also fixes references triggered on a definition link
2022-03-31 15:11:34 -07:00
Matt Bierner
6da26a9351
Fix duplicate resources sometimes opened from references
2022-03-31 11:56:37 -07:00
Matt Bierner
e32a13be77
Fix references to header to return just the span of the header itself and not its body
2022-03-31 11:56:37 -07:00
Matt Bierner
55719a3dc5
Remove dup type
2022-03-30 16:33:34 -07:00
Matt Bierner
1bb96d5d72
Mark methods private
2022-03-30 16:33:34 -07:00
Matt Bierner
afad64c534
Move function to method
2022-03-30 16:33:33 -07:00
Matt Bierner
174924d73c
Clean up link data structure
2022-03-30 16:33:33 -07:00
Matt Bierner
cfe0b1d480
Extract getReferencesToLink and getReferencesToReferenceLink
2022-03-30 16:33:32 -07:00
Matt Bierner
2510e3dca6
Refactoring md refs provider to prep for re-use
2022-03-30 16:33:32 -07:00
Matt Bierner
590a9bf8a3
Make sure double click in md preview always reveals target line
...
Fixes #146333
2022-03-30 15:49:56 -07:00
Matt Bierner
8a4f35d96a
Better comment
2022-03-30 15:49:56 -07:00
Matt Bierner
6c7ba2de69
Fix refs to own file being included in md ref results from other file
...
For #146277
2022-03-30 15:22:15 -07:00
Matt Bierner
982a353285
workspaceFile -> workspacePath
2022-03-30 15:14:34 -07:00
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
2edb9bc9ca
Reapply parcel/watcher adoption
...
Revert "Revert e7fffbf1c9169087f1098aedfe54c59c079fa3ac"
This reverts commit 6786b0ad7d
.
Two changes:
- Lazy import parcel/watcher
- Add `@parcel/watcher` as a dev dep in extensions folder so that we pull in correct version for build os
2022-03-24 14:13:39 -07:00
Dirk Baeumer
6786b0ad7d
Revert e7fffbf1c9
2022-03-24 09:04:05 +01:00
Matt Bierner
e7fffbf1c9
Use parcel for watching esbuild build files
...
Seeing small but consistent cpu usage when using esbuild's watcher. Switch to parcel to avoid this
2022-03-23 14:49:59 -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
Logan Ramos
9b7268acf9
Update telemetry module
2022-03-18 11:34:33 -04: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
eaf352e6d1
Hook up watch properly for extension build scripts
2022-03-08 17:54:16 -08:00
Matt Bierner
78e1b3cca8
Bump highlight JS version
2022-03-08 16:27:42 -08:00
Matt Bierner
fb6cf37ea9
Move simple-browser to use esbuild for webview scripts
2022-03-08 16:23:14 -08:00
Matt Bierner
2f48496d2b
Switch the markdown preview script to use esbuild
2022-03-08 15:48:13 -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
David Dossett
4bef8dc8d7
Fix #143837
2022-02-23 16:55:41 -08:00
Matt Bierner
9e3d77b1e4
Also use relative pattern for watching markdown resources
2022-02-22 16:22:55 -08:00
Martin Aeschlimann
db9e8fba63
remove unecessary files in build
2022-02-18 20:38:55 +01:00
rebornix
a93f7e0b23
indentation.
2022-02-16 18:05:40 -08:00
rebornix
07e840cb51
Support syntax highlighting in code blocks in markdown output
2022-02-16 15:18:54 -08:00
Matt Bierner
2b752cc239
Only remove margin on last child of preview
...
Fixes #142791
2022-02-11 16:27:02 -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
Johannes Rieken
7ccb868835
make sure to use .eslintignore
when running yarn eslint
, this will ensure that cli failure and editor squiggles are always equal
2022-02-02 12:37:29 +01:00
Matt Bierner
90b50dc7e2
Use ?. in a few more places
2022-02-01 13:59:12 -08:00
Megan Rogge
265cca240a
tweak bold regexp ( #141968 )
2022-02-01 14:10:02 -06:00
Matt Bierner
fdd5c8471a
Avoid lookbehind in regexp
...
Fixes #141689
2022-01-27 17:54:50 -08:00
Matt Bierner
4bdfc9ad01
type -> interface
2022-01-27 17:54:50 -08:00
Matt Bierner
ae08924bfa
readonly
2022-01-27 17:54:50 -08:00
Waqas Ali
a514979b02
Prevent link highlight in markdown code blocks and spans ( #140816 )
...
* Prevent link highlight in markdown codeblocks (#139770 )
* Handle inline codespan variants for markdown link provider (#139770 )
* Refactor codespan detection in markdown link provider (#139770 )
2022-01-25 12:38:50 -08:00
Matt Bierner
b44c6b3e0f
Treat / as relative to current folder for loose md files
2022-01-24 15:01:52 -08:00
Matt Bierner
968ef3a828
Implement opening for markdown custom editor
...
Fixes #138196
2022-01-19 14:41:39 -08:00
Matt Bierner
280658327f
Move toc expanding for notebooks logic into toc
2022-01-19 14:41:38 -08:00
Matt Bierner
a2d7dfaf35
Simplify toc structure
2022-01-19 14:41:38 -08:00
Matt Bierner
7756c6d7c7
Enable header completions for rest of notebook markdown cells
2022-01-19 14:41:38 -08:00
Matt Bierner
920a00d09d
Use markdown renderer for text/latex ( #139154 )
...
Fixes #123144
Uses the standard markdown renderer for `text/latex` outputs. This enables support for python outputs such as:
```python
%%latex
Given : $\pi = 3.14$ , $\alpha = \frac{3\pi}{4}\, rad$
```
2022-01-19 13:26:52 -08:00
Logan Ramos
c047af40b2
Fix compilation
2022-01-19 16:18:14 -05:00
Logan Ramos
b22ee20028
Move to @vscode/extension-telemetry
2022-01-19 15:57:17 -05:00
Matt Bierner
0906e08747
Enable path completions in notebook markdown cells
2022-01-19 11:31:10 -08:00
Matt Bierner
a3e350e5b3
Enable completions in markdown defintions
...
Fixes #140602
2022-01-14 15:15:56 -08:00
dependabot[bot]
2fcbbdc3c8
Bump markdown-it in /extensions/markdown-language-features ( #140598 )
...
Bumps [markdown-it](https://github.com/markdown-it/markdown-it ) from 12.2.0 to 12.3.2.
- [Release notes](https://github.com/markdown-it/markdown-it/releases )
- [Changelog](https://github.com/markdown-it/markdown-it/blob/master/CHANGELOG.md )
- [Commits](https://github.com/markdown-it/markdown-it/compare/12.2.0...12.3.2 )
---
updated-dependencies:
- dependency-name: markdown-it
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-13 17:04:53 -08:00
Matt Bierner
3d79cbb912
Fix markdown path suggestions on windows
2022-01-13 16:51:36 -08:00
Matt Bierner
a1f3d41472
Use generators
2022-01-12 19:17:45 -08:00
Matt Bierner
dc03ccdfa9
Support insert and replace completion styles for paths in markdown
2022-01-12 19:05:37 -08:00
Matt Bierner
fb98c6da10
Skip path completion tests for now
...
A few of these are failing on windows. Need to test over there
2022-01-12 19:05:37 -08:00
Matt Bierner
1f6c069a1a
Adding basic support for reference link completions
...
For #140602
2022-01-12 19:05:37 -08:00
Matt Bierner
a4e529c759
Add basic markdown link completions
...
For #140602
Only normal links for now. Will add reference links later. Should support the forms:
- `[](dir/file.md)`
- `[](./dir/file.md)`
- `[](/root-dir/file.md)`
- `[](#header)`
- `[](./dir/file.md#header)`
2022-01-12 18:13:21 -08:00
Matt Bierner
43c5bc4795
Always add dirname of current md document to localResourceRoots
...
Fixes #139907
Previously we only added this dir on `file` file system
2022-01-11 12:39:54 -08:00
Matt Bierner
f528f1a415
Make sure markdown refresh forces the preview to be updated
2022-01-08 17:30:37 -08:00
Matt Bierner
ef69c9c8d8
Fix markdown pinning test
2022-01-05 14:49:00 -08:00
Mohammad Sadegh Salimi
2a0d371ca3
Adding support for RTL languages for readme markdown preview. ( #139644 )
...
* [markdown preview] dir "auto" added to the markdown-body class.
* fix markdown preview for RTL languages
2022-01-05 14:14:32 -08:00
Logan Ramos
932ab8e485
Update vscode extension telemetry modules
2021-12-28 11:06:48 -05: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
Kaan Genç
ab2b080715
hasCustomMarkdownPreview disables markdown preview buttons in context menus ( #139241 )
2021-12-15 14:19:39 -08:00
Matt Bierner
5cbc8ed825
Enable find widget in markdown preview custom editors
...
Fixes #139148
2021-12-14 18:37:47 -08:00
Matt Bierner
9f454a39b3
Fix md preview trying to update its content on dispose
2021-12-14 18:37:47 -08:00
Matt Bierner
913639f42a
Strip meta http-equiv tags from webview content updates
2021-12-14 11:53:49 -08:00
Hans
3abcabd4e8
fix generates different html content for the same markdown ( #138935 )
...
fix generates different html content for the same markdown when get the cached token
2021-12-13 16:55:54 -08:00
Matt Bierner
e88394000f
Fix markdown outline for cases without a space after #
...
Fixes #138027
2021-12-06 15:58:11 -08:00
Joyce Er
efd055b8ba
Refresh markdown preview on all file changes ( #138301 )
...
* Refresh markdown preview on all file changes
* Don't watch `https`, `http`, and `data` uris
2021-12-06 12:36:22 -08:00
Matt Bierner
c8a321ae17
Skip document link test on web
...
Fixes #136738
Cant figure out why these tests sometimes timeout in safari on web. Only in ci too it seems :/
2021-11-15 13:27:04 -08:00
Johannes Rieken
09c9d4c293
use enabledApiProposals
instead of wildcard property, also update compilation units to only include d.ts-files that are needed, https://github.com/microsoft/vscode/issues/131165
2021-11-12 11:05:57 +01:00
Johannes Rieken
a4d426a1c2
split vscode.proposed.d.ts into a file per proposal, https://github.com/microsoft/vscode/issues/131165
2021-11-12 09:48:17 +01:00
Matt Bierner
40fbc4e89e
Unskip test
2021-11-11 09:20:58 -08:00
Johannes Rieken
edb91ace89
Merge branch 'main' into joh/vscode-dts
2021-11-11 09:30:36 +01:00
Matt Bierner
3a79384dbf
Tempoary skip sometimes flaky tests
2021-11-10 20:28:43 -08:00
Matt Bierner
4c00e6de08
Adding logging to test
...
For #136738
2021-11-10 16:07:35 -08:00
Matt Bierner
71f615b105
Also compare other attributes for md preview updates
...
Fixes #136816
2021-11-10 14:13:41 -08:00
Johannes Rieken
d90dd1355b
Merge branch 'main' into joh/vscode-dts
2021-11-10 08:40:26 +01:00
Matt Bierner
23090cfde3
Force update the md preview when a file on disk changes
2021-11-09 16:14:04 -08:00
Matt Bierner
53c29fc51f
Use inherited font size for markdown codeblocks
...
Testing this out since it can look weird to have code blocks in a small font while the rest of markup is large
2021-11-09 16:14:04 -08:00
Matt Bierner
a4ad395f23
Increase default markup font size
...
For #126294
2021-11-09 14:23:15 -08:00
Johannes Rieken
68e819043c
use tsconfig.json#include for vscode.d.ts and vscode.proposed.d.ts, enables to remove most ref.d.ts-files
2021-11-09 15:53:35 +01:00
Johannes Rieken
9254a8cd27
move vscode.d.ts and vscode.proposed.d.ts into src/vscode-dts
-folder, https://github.com/microsoft/vscode/issues/131165
2021-11-09 15:00:03 +01:00
Matt Bierner
8b7aa3c278
Use editor font for markdown codeblocks
...
For #136693
2021-11-08 14:11:59 -08:00
Matt Bierner
5e6d0e1cbb
Initial support for syntax highlighting md code blocks in notebooks
...
For #136693
2021-11-08 12:30:13 -08:00
Logan Ramos
00de6a5f2f
Update telemetry module
2021-11-08 10:00:44 -05:00
Matt Bierner
d1f2d0a729
Tweak markdown notebook header sizes
...
Fixes #105900
2021-11-05 15:57:30 -07:00
Matt Bierner
69ca0f29fd
Enable linkify in notebook markdown
...
Fixes #136545
2021-11-05 13:52:53 -07:00
Matt Bierner
1051cf402e
Unmark preview as experimental
...
Fixes #84520
Seems to be working well enough now to officially support
2021-11-04 17:30:00 -07:00
Matt Bierner
c11a9ce097
Better update of line numbers
2021-11-04 14:34:49 -07:00
Matt Bierner
516bc19e99
Fix md preview reverting to original version when switching away
2021-11-03 20:54:21 -07:00
Matt Bierner
4d50e586ec
Improve morphing for vscode-docs
2021-11-03 20:54:20 -07:00
Alex Dima
a704a69394
Enforce that source code uses a small subset of Unicode
2021-11-03 23:34:41 +01:00
Kaan Genç
1aa9a712d1
Allow extensions to disable built-in markdown preview button ( #136273 )
...
* Allow extensions to disable built-in markdown preview button
Adds a flag for the "Open Preview to the Side" button displayed for markdown files. This makes it possible for extensions to hide this button when desired by setting the flag to true. For example, extensions can now use the following line to disable the preview button:
```js
vscode.commands.executeCommand("setContext", "hasCustomMarkdownView", true);
```
* update keyword for disabling default markdown preview
2021-11-03 14:49:44 -07:00
Matt Bierner
a046cfb481
Revert "Remove image stabilizer code"
...
This reverts commit 69e8e3c091263a2e00592cca06bf1dba96b70c7e.
2021-11-03 14:48:48 -07:00
Matt Bierner
1f3f74f4ea
Clear this._fileWatchersBySrc
2021-11-03 14:48:47 -07:00
Matt Bierner
86c446baee
Don't update icon path so much
...
We only need to update this on creation, never every time something changes
2021-11-03 14:48:47 -07:00
Matt Bierner
9c2b239e2e
Remove image stabilizer code
...
Should not be required with incremental dom updates
2021-11-03 14:48:46 -07:00
Matt Bierner
359cd4330d
clean up onDidChangeActiveTextEditor
...
Also fixes potential bug if line === 0
2021-11-03 14:48:46 -07:00
Matt Bierner
97e646c0da
Update preview if text document is reopened
...
Fixes #135568
2021-11-03 14:48:45 -07:00
Matt Bierner
7d46b77c31
Disable fuzzy links in md preview
...
Fixes #136198
2021-11-01 17:41:40 -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
a9bc0553f7
Support definition links with spaces
...
For #136073
2021-11-01 09:23:03 -07:00
Matt Bierner
7bc28074bf
Exclude tr from markdown hover
...
Fixes #135278
Fixes #135037
2021-10-18 17:13:44 -07:00
Matt Bierner
b7c340f119
Simplify import path
2021-10-14 09:32:35 -07:00
Matt Bierner
c986aef642
Remove .only and fix fragment used when opening file
...
Keeping the fragment causes a duplicated file to be opened
2021-10-13 19:33:56 -07:00
Matt Bierner
830987eac3
Refactor document link opening
...
- Extract out of command
- Try to preserve uri instead of converting to path
- Better handle case with absolute file path when there is no workspace
2021-10-13 19:27:35 -07:00
Matt Bierner
d1f72b5420
Try to clairify how md links are resolved
...
For #101203
The current logic ends up tossing out the uri scheme and other important info when opening md links. This PR tries to avoid that
2021-10-13 19:00:19 -07:00
Matt Bierner
8b2b819f55
Update test case
2021-10-12 17:29:53 -07:00
Matt Bierner
5d60bcd241
Fix null type error
2021-10-12 17:02:06 -07:00
Lemmingh
d3ceb35bec
Add source map for every possible element in the Markdown preview ( #134799 )
...
* Update markdown-it and type definitions
* Refresh the source map mechanism in `markdownEngine.ts`
2021-10-12 16:25:56 -07:00
Jim Griesmer
845af8a5c3
Enlarge small markdown text size - trivial change ( #134550 )
...
* Enlarge small markdown text size - trivial change
* Didn't intend to change h1 line height
* Simplify font-size story for h1, h2, h3 and p
2021-10-08 12:29:39 -07:00
Matt Bierner
0dae77d06e
Enable markdown links with line numbers to non-md files
...
Fixes #125320
2021-10-07 18:35:09 -07:00
Matt Bierner
ecae847b95
Fix navigate in untitled files
2021-10-07 18:14:16 -07:00
Matt Bierner
d8507236f1
Rewrite logic for opening markdown document links
...
Fixes #133823
This rewrites openDocumentLink to use `stat` to check if files exists before trying to open them. This lets us avoid showing extra error popups while trying to open resources
2021-10-07 18:10:05 -07:00
Logan Rasmussen
35ea6c0cf5
Remove angle brackets when checking the scheme ( #133419 )
...
* Remove angle brackets when checking the scheme
This only removes the brackets during the scheme check if the initial link provided actually has angle brackets.
* Move angle bracket logic to document link file
Change to use replace instead of match for easier reading
2021-10-04 08:31:52 -07:00
Logan Ramos
a4342f3add
Bump telemetry module
2021-10-01 16:52:56 -04:00
Don Jayamanne
d2c7e3d06f
Remove built-in latext output rendering in nb
2021-09-29 16:02:47 -07:00
Alex Dima
bfc02befad
Revert "Update highlightjs"
...
This reverts commit 436f9d38b0
.
2021-09-28 00:59:21 +02:00
Matt Bierner
436f9d38b0
Update highlightjs
2021-09-27 15:43:26 -07:00
Don Jayamanne
cb70ab5526
Merge pull request #133464 from DonJayamanne/textLatex
2021-09-23 15:13:16 -07:00
Logan Ramos
282f499c22
Update extension telemetry module
2021-09-23 11:26:57 -04:00
Don Jayamanne
1e5e3642b2
Misc
2021-09-22 13:16:37 -07:00
Matt Bierner
4c78259529
Revert 75e1fa6c43
...
Fixes #132741
Let's keep the outline extensible. Instead, a markdown extension could contribute support for the syntax in the original issue in #131427
2021-09-14 16:36:53 -07:00
Matt Bierner
e43d47e852
Add missing await
...
Doesn't seem to cause any issues currently
2021-09-14 09:54:05 -07:00
Matt Bierner
d3585388be
Make sure markdown.showSource correctly awaits opening the document
...
Fixes #132914
2021-09-14 09:54:05 -07:00
Matt Bierner
c62f59fcae
Fix map func not having this
bound
...
Fixes #132703
2021-09-09 15:03:30 -07:00
Matt Bierner
277f6ef132
Log errors when loading markdown-it plugins
2021-09-08 15:12:46 -07:00
Matt Bierner
0e52275271
Introduce WebviewOptions.forms
...
Fixes #132157
2021-09-02 13:24:49 -07:00
John Murray
75e1fa6c43
fix #131427 ignore extension contributions when populating Outline for markdown file ( #131572 )
2021-08-30 14:13:17 -07:00
Matt Bierner
28bc889cea
Use ActivationFunction
2021-08-30 13:54:39 -07:00
Matt Bierner
0ec3d48b70
Use @types/vscode-notebook-renderer
2021-08-30 13:54:39 -07:00
Logan Ramos
8dbad73de5
Update built in extensions telemetry
2021-08-27 15:45:42 -04:00
Logan Ramos
ecc7fdac90
Bump extension telemetry module
2021-08-27 11:29:48 -04:00
Benjamin Pasero
68daa9669e
fix #131535 ( #131630 )
2021-08-25 10:53:38 -07:00
Matt Bierner
e56fa01346
Switch to dompurify
2021-08-18 16:54:59 -07:00
Matt Bierner
068dcfbfc8
Allow images in md by default
2021-08-18 16:54:58 -07:00
Matt Bierner
a6d26aa31c
Add insane for notebook markdown rendering
2021-08-18 15:09:23 -07:00
Jean Pierre
c094fcf995
Fixes #113475 ( #130815 )
2021-08-16 16:47:23 -07:00
Matt Bierner
691e9cea33
Support clickable links between markdown cells
...
Fixes #103519
2021-08-13 14:17:10 -07:00
Logan Ramos
da7d76d2ec
Update extension telemetry module
2021-08-10 12:43:41 -04:00
Logan Ramos
6aa5b9226b
Update extension telemetry module
2021-08-09 13:16:08 -04:00
Matt Bierner
dc54347a27
Exclude a few extra build files from build
2021-08-05 13:32:54 -07:00
Matt Bierner
af39918361
Organize imports in md ext
2021-08-03 13:22:46 -07:00
Matt Bierner
5f45df8330
Fix formatting
...
Github merge UI :'(
2021-08-02 19:54:03 -07:00
Nicholas Rayburn
72d9aa625e
Fix #124276 batch markdown file requests ( #124545 )
...
* fix #124276 batch markdown file requests
* cleanup and modify return type
* Revert "cleanup and modify return type"
This reverts commit 62d62b4947
.
* cleanup getAllMarkdownDocuments
* fix markdown batching
* fix var not being modified
cleanup function call
remove modulo use
* don't create a new array on each iteration
Co-authored-by: Matt Bierner <matb@microsoft.com>
2021-08-02 19:44:56 -07:00
Logan Ramos
9350fa3c9d
Bump telemetry module to fix packaging
2021-08-02 14:29:37 -04:00
Logan Ramos
b7a07daa5a
Fix #129727
2021-08-02 13:04:26 -04:00
Logan Ramos
87e0cb1d43
Fix #129474
2021-07-29 11:39:03 -04:00
gregvanl
91ae221db4
Settings description typos
2021-07-26 11:47:38 -07:00
Logan Ramos
c8e6d08e3a
Update to the latest extension module
2021-07-26 13:44:43 -04:00
Matt Bierner
134c345351
Try adding browser specific tsconfig
...
Trying to add this to catch dependencies we take on node types
2021-07-22 17:00:17 -07:00
Matt Bierner
b7cba9e7d4
Don't use custom tsconfig settings for markdown ext
2021-07-22 17:00:17 -07:00
Matt Bierner
ff922dc231
Use TextDecoder instead of Buffer
...
Fixes #129165
2021-07-22 13:36:22 -07:00
Martin Aeschlimann
7927075f89
Merge pull request #128545 from microsoft/joh/webpack5
...
Adopt webpack 5
2021-07-14 22:32:54 +02:00
Matt Bierner
5b8ce768f3
Add getNonce function to generate webview nonces
2021-07-13 10:02:24 -07:00
Martin Aeschlimann
7ebe6a6054
adopt web extensions to webpack 5
2021-07-08 21:41:03 +02:00
Matt Bierner
a71ebc98ff
Avoid warning when acessing md setting
2021-07-07 16:58:04 -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
Andrea Mah
1664732e44
separated editor scroll info by type and consume entry on access
2021-06-14 13:34:41 -06:00
Matt Bierner
bc14fe9e8d
Use templates for markdown styles
...
These styles shouldn't be added into the notebook itself, only into the shadow dom of the markdown cells
2021-06-09 15:17:21 -07:00
Matt Bierner
39dc60dec6
Move notebook empty markdown cell logic into markdown extension
2021-06-08 13:50:10 -07:00
Matt Bierner
30ed48f190
Move notebook markdown styles and shadow root to markdown-it extension
2021-06-08 13:08:44 -07:00
Matt Bierner
0a57fd87b1
Enable math in markdown preview
...
Fixes #124783
2021-06-08 09:58:54 -07:00
Henning Dieterichs
ce5023b635
Merge pull request #124015 from microsoft/hediet/refactor-language-configuration
...
Refactors calls to languages.setLanguageConfiguration to declarative descriptions in language-configuration.json
2021-06-08 16:19:10 +02:00
Matt Bierner
fd430418a0
Refine CellInfo
type ( #125351 )
...
For #125269
- Rename `CellInfo` - >`OutputItem` (only internally, we also need to update the published types)
- Move `id` into `OutputItem`
- Move `element` out of `OutputItem`
- Rename `renderCell` to `renderOutputItem`
- Rename `destoryCell` to `disposeOutputItem` (`dispose` is the term we generally use in our APIs)
2021-06-03 13:01:02 -07:00
Henning Dieterichs
feed53b813
Merge branch 'main' into hediet/refactor-language-configuration
2021-05-31 19:40:48 +02:00
rebornix
866ecdd45a
Merge branch 'notebook/dev' into main
2021-05-27 14:04:55 -07:00
Matt Bierner
b8f11107f7
Use @types/vscode-webview
2021-05-27 13:41:38 -07:00
Johannes Rieken
9ef57b5c21
remove NotebookCellOutputItem#value, https://github.com/microsoft/vscode/issues/123884
2021-05-27 14:55:25 +02:00
Matt Bierner
6a12866c3e
💄
2021-05-26 12:55:32 -07:00
Ashray Jha
5eb64c54ca
Modified markdown preview nested list styling ( #124445 )
...
* Modified markdown preview nested list styling
* Added proper styling to the nested list
* merge different rules into a single one
2021-05-26 09:05:35 -07:00
rebornix
473cfe28bf
Revert "Revert "Merge branch 'main' of https://github.com/microsoft/vscode into main""
...
This reverts commit 7c01395da1
.
2021-05-25 17:49:34 -07:00
Harald Kirschner
7c01395da1
Revert "Merge branch 'main' of https://github.com/microsoft/vscode into main"
...
This reverts commit 7a976501eb
, reversing
changes made to 2257676834
.
2021-05-25 17:19:40 -07:00
Johannes Rieken
ffd1f84ea9
rename notebookOutputRenderer to notebookRenderer, https://github.com/microsoft/vscode/issues/121819
2021-05-25 12:31:53 +02:00