Commit Graph

65 Commits

Author SHA1 Message Date
Matt Bierner
f4bf1f30a2 Skip ul and ol when highlighting selected markdown element (#161139)
Fixes #155552

For lists, the outer ul/ol always has the same source line as the first element in the list. We should prefer using the first element in the list when highlighting the active line

This also fixes a bug where scroll sync would stop working if you added lines to the doc. This was caused by `lineCount` getting out of sync as the document is being updated. I've removed this state and made the reveal logic more robust instead
2022-09-19 07:16:06 +02:00
Matt Bierner
a13e5e1da6 Also apply max-width to videos in webviews (#159500) 2022-08-30 00:52:54 +02:00
David Dossett
4bef8dc8d7 Fix #143837 2022-02-23 16:55:41 -08:00
Matt Bierner
7bc28074bf Exclude tr from markdown hover
Fixes #135278
Fixes #135037
2021-10-18 17:13:44 -07: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
Hassan Sani
dbdc7a259e added bottom spacing for table in markdown preview (#124385) 2021-05-24 12:14:01 -07:00
Matt Bierner
c0885dd0c4 Add task to build extension media (#119294)
This lets us avoid checking in the compiled js files that are used inside webviews and notebooks
2021-03-18 19:15:59 -07:00
Matt Bierner
a68f1326e8 Update built markdown preview code 2021-01-15 10:38:50 -08:00
Matt Bierner
90b17ed115 Make it easier to override markdown table stylings
Fixes #105796

This makes the markdown preview's default css for tables less specific. This should make it easier to user or extensions to override it
2020-11-02 13:53:26 -08:00
Matt Bierner
bd11c7f95a Don't use negative margins for spacing in markdown preview 2020-08-03 12:27:57 -07: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
Jason Williams
9a12a5abed fix paragraphs inside of <ul>'s which are too spaced apart. (#102719)
* * paragraphs inside of <ul>'s were too spaced apart.
* It looks odd because markdown converts list items to <p>s

* li > p should be even better
2020-07-16 11:20:38 -07:00
Jason Williams
3ef3c105e6 h1 bottom margin is too much (#102520) 2020-07-14 11:21:45 -07:00
Matt Bierner
c828a5339b Fix indentation style 2020-07-13 18:01:07 -07:00
Jason Williams
b8e773ebed fix styling to improve heading spacing fixes #102036 (#102427)
* updating styling to make headings look better

* be consistent and use em
2020-07-13 17:40:38 -07:00
Matt Bierner
b95968eafb Don't include inline source maps in markdown preview scripts 2020-06-17 15:24:16 -07:00
Miguel Solorio
fe70e8e27b Update markdown extension to use codicons (fixes #99976) 2020-06-12 11:30:53 -07:00
Benjamin Pasero
588097171c Refactor our font stack (#99429)
* fonts - adopt monaco-monospace-font in more places and make it consistent

* font - use platform specific fonts in more places

* font - move system-ui before Ubuntu font in places where we cannot control platform

* font - only use system-ui on Linux

* fonts - adjust font stack for other windows
2020-06-05 10:56:07 +02:00
Matt Bierner
3e9b7f5072 Fix markdown fontsize
Fixes #98178
2020-05-20 15:40:27 -07:00
Matt Bierner
df88d8a7ef Use vscode editor font variable in markdown preview
Fixes #97374
2020-05-11 14:23:16 -07:00
Danny Lin
ff118340b5 Use system-ui alias for UI fonts (fixes #10144) (#96948)
Commit 45d93e9325 applied this change in
some areas, but it was reverted to fix #28619. The underlying cause of
the regression was Chromium bug 733219 [1], which has now been fixed, so
this change should be safe to apply now.

The old font stacks have been kept with lower priorities to work around
Chromium bug 724393 [2].

[1] https://bugs.chromium.org/p/chromium/issues/detail?id=733219
[2] https://bugs.chromium.org/p/chromium/issues/detail?id=724393
2020-05-08 08:21:40 +02: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
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
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
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
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
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
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
Matt Bierner
a558a9504a Adding toWebviewResource api
For #76489
2019-07-08 18:38:47 -07:00
Miguel Solorio
0f295fd07b Update markdown preview icon to have bevel edges 2019-07-03 15:05:45 -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
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
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
f250d19bb5 Use relative size for markdown code font size
Fixes #74125
2019-05-22 10:53:49 -07:00
Matt Bierner
003521e715 Fix markdown preview restoring to wrong position on restart 2019-02-14 18:24:01 -08:00
Benjamin Pasero
83232ef060 fonts - remove HelveticaNeue-Light from list 2019-01-04 10:11:04 +01: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