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
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
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
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
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
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
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
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
Akat
b499467f9f
fix(markdown): avoid considering link references/sources in code sections ( #146826 )
2022-04-07 14:50:37 -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
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
baa7434480
Use header text as placeholder for md rename
...
For #146291
2022-04-04 15:56:28 -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
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
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
2510e3dca6
Refactoring md refs provider to prep for re-use
2022-03-30 16:33:32 -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
17783a09e5
Add support for reference to ref links in md
...
For #146277
2022-03-30 14:36:03 -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
407b66a6d4
Remove extra await
2022-03-29 18:19:51 -07:00