Commit Graph

310 Commits

Author SHA1 Message Date
Matt Bierner e44d9a2888 Rename parameter 2019-08-20 11:28:31 -07:00
Matt Bierner 1802be3b70 Always require an argument to command
#75612
2019-08-20 11:26:49 -07:00
Matt Bierner f509f7f141 Rename command
#75612
2019-08-20 11:25:42 -07:00
Matt Bierner 7c3aeb10a2 Merge pull request #77151 from connor4312/feat/markdown-render-command
feat(markdown): add render command (fixes #75612)
2019-08-20 11:23:47 -07:00
Matt Bierner c5dc9d16be Finalize asWebviewUri api
Fixes #79242

As discussed, renames `toWebviewResource` to `asWebviewUri` to be consistent with the `asAbsolutePath` api naming
2019-08-19 20:18:26 -07:00
Matt Bierner b9b5692e27 Support using csharp in markdown preview to identify c# code blocks 2019-08-19 09:18:22 -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 1bbf3b3fa6 Add telemetry+warning for webviews that don't have a content security policy
Fixes #79248
2019-08-15 15:16:39 -07:00
Matt Bierner e1d3dd53d1 Mark static readonly 2019-07-22 16:24:53 -07:00
Neonit c5ab082ed7 Adjust Code Tab Size to 4 in Markdown Preview
Sets the tab size to 4 in the Markdown preview for code blocks in Markdown documents. I consider a tab size of 4 being standard and the default of 8 being unbearable. The few people, if any, using a different tab size than 4 can use the custom markdown preview style feature, if it is going to be fixed anytime (https://github.com/microsoft/vscode/issues/77290).

[`tab-size` is still marked *experimental* in the MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/tab-size), but it doesn't hurt, if not supported. However, in the used Chromium version it is supported.
2019-07-22 11:49:04 +02:00
Pine bfd274a23b Merge pull request #77546 from microsoft/pine/builtin-array-setting
Use array of string for applicable builtin settings
2019-07-18 14:03:59 -07:00
Pine Wu d44f9dae34 Use array of string for applicable builtin settings 2019-07-17 15:07:31 -07:00
Matt Bierner b850405aa6 Merge pull request #76647 from masliu/master
Save resourceColumn for previews, fixes #74008
2019-07-17 16:01:46 -07:00
Matt Bierner 12e482f532 Remove markdown.tmbundle from markdown language features extension
The grammar is contributed by the language basics extension
2019-07-12 11:59:50 -07:00
Connor Peet 3c42f56552 fixup! render a string as well 2019-07-11 11:24:28 -07:00
Connor Peet 7dd109c2df feat(markdown): add render command (fixes #75612)
This adds a command which renders the provided document, or the active
editor if one is provided. Following the pattern of some of the preview
commands, it returned `undefined` if there's no document provided and
no active text editor. Otherwise, seems to work...

```ts
const html = await vscode.commands.executeCommand<string>('markdown.render');
```

A way to render arbitrary strings in addition to documents may be useful at
some point in the future. However, I didn't implement that here as that'd
require some refactoring of the markdown engine. If we're interested though
I could certainly give that a shot.
2019-07-10 15:49:06 -07:00
Matt Bierner 4c07744817 Make sure we handle loading of markdown resources from UNC workspace correctly
Fixes #48403
2019-07-09 15:52:43 -07:00
Matt Bierner c01a3a718d Use clearer name for csp webview element
#76489
2019-07-09 11:45:20 -07:00
Matt Bierner a558a9504a Adding toWebviewResource api
For #76489
2019-07-08 18:38:47 -07:00
masliu 173d010b0a Rename sourceViewColumn to resourceColumn 2019-07-04 22:29:23 -04:00
masliu 47f9ed5d22 Save source viewColumn for previews, fixes #74008 2019-07-04 21:37:28 -04:00
Miguel Solorio 0f295fd07b Update markdown preview icon to have bevel edges 2019-07-03 15:05:45 -07:00
Matt Bierner 9e7bb2c881 Support image/* data uris in markdown preview
Fixes #76080
2019-07-01 15:57:35 -07:00
Miguel Solorio 05ee90f7fd Merge remote-tracking branch 'origin/master' into misolori/new-icons 2019-06-28 11:05:33 -07:00
Miguel Solorio 9f7dd28e6d Update icons 2019-06-26 15:46:15 -07:00
Matt Bierner be41fd02a2 Show document link tooltip first and put click instructions in parens
Fixes #76077

This change also update our standard link hovers to follow this format
2019-06-25 16:38:50 -07:00
Matt Bierner 8119b4aee7 Move the webviewResourceRoot property to be set on each webview instead of as a global property
For #72155

This allows  us to potentially change the resource root per webview
2019-06-24 17:07:06 -07:00
Miguel Solorio e998949260 Update markdown icons 2019-06-20 11:53:01 -07: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 18ba826e67 Markdown previews should be able to load resources from next to where they are running
Add `'self'` to some content security policies for the preview
2019-06-17 11:20:19 -07:00
Matt Bierner 2ad085b5bd Merge pull request #75357 from Olovan/fix_35245
Fix for issue #35245
2019-06-12 16:56:13 -07:00
Micah Smith 01f7276b7e Fix for issue #35245 2019-06-12 14:30:54 -04:00
Matt Bierner 8de74d9255 Extracting common webview elements
Minimizing diff with the iframe based webview branch
2019-06-11 22:45:55 -07:00
Aurélien Pupier 7a5bca9faf Add License field to package.jsons #68423 (#68771)
it should avoid to have "warning XXX: No license field" during yarn
build

Signed-off-by: Aurélien Pupier <apupier@redhat.com>
2019-06-06 11:44:50 +02:00
Matt Bierner b33f52a46e Update highlightjs version 2019-06-05 15:41:45 -07:00
Benjamin Pasero d78a75973c update @types/node (#74881) 2019-06-05 10:20:01 +02:00
Matt Bierner 143bebfbb4 Use em for code font size instead of rem
This fixes some cases where a user style sheet may be setting a weird base font-size.
2019-05-29 15:44:48 -07:00
Matt Bierner f3b8d15b0d Add DocumentLink.tooltip api proposal
For #72824
2019-05-23 17:57:04 -07:00
Matt Bierner 71deb5b6ee Extend disposable 2019-05-22 15:25:48 -07:00
Matt Bierner 519eb3690c Extract duplicated escaping code 2019-05-22 15:25:48 -07:00
Matt Bierner f250d19bb5 Use relative size for markdown code font size
Fixes #74125
2019-05-22 10:53:49 -07:00
Howard Hung 0ddd999172 Fix typo: showSecutitySelectorForResource -> showSecuritySelectorForResource 2019-05-22 01:25:59 +08:00
Matt Bierner 4470b868a3 Check pending version before updating markdown preview content
For #72671
2019-04-29 13:49:36 -07:00
Matt Bierner 6b2daa3388 Revert marking markdown extension with explicit kind 2019-04-22 21:05:16 -07:00
Matt Bierner 5ae3178c1d Mark markdown as a ui extension 2019-04-15 15:28:03 -07:00
Matt Bierner 312b09cc6b extract setContent 2019-04-12 14:43:14 -07:00
Matt Bierner 74103c4c8d Don't change preview when click fails but do show an alert 2019-04-12 14:43:14 -07:00
Matt Bierner 3b58a011da Only try/catch openTextDocument 2019-04-12 14:43:14 -07:00
Matt Bierner c79f1cd8e3 Styling 2019-04-12 14:43:14 -07:00
pkoushik bda2870db9 fix-71570 Fixed localize string issue 2019-04-06 12:19:10 +05:30