Commit Graph

57 Commits

Author SHA1 Message Date
Matt Bierner 7c96cd3c4a Support Fragments for intra document markdown editor links (#19639)
Adds support for editor links with fragements for markdown. This jumps to the correct header location if one can be found
2017-01-31 11:05:06 -08:00
Matt Bierner 15c2d1f51e Move markdown preview content provider to own file (#19592) 2017-01-30 12:36:43 -08:00
Matt Bierner f7697a7f37 Support In-Document links inside of the markdown editor (#19411)
* Support In Document links inside of the markdown editor

Fixes #17288

* Cleaning up code to reduce duplication
2017-01-27 14:36:28 -08:00
Matt Bierner dbb77f1eef Smooth markdown scrolling 2017-01-24 22:22:51 -08:00
Matt Bierner b1ff58b808 Fixes #19324 2017-01-24 19:51:56 -08:00
Matt Bierner d0163a1401 Fixes #19190 2017-01-24 19:30:29 -08:00
Matt Bierner 41a5c6858c Remove duplicate calls in markdownEngine 2017-01-24 17:14:15 -08:00
Matt Bierner e7730e36a5 Scroll sync for list items and quotes fixes #19151 2017-01-24 15:46:01 -08:00
Matt Bierner d1998fef44 Remove logging call 2017-01-24 14:59:45 -08:00
Matt Bierner 77fbceeb1e Use selection active for initial line as well 2017-01-24 14:58:36 -08:00
Matt Bierner a765a1a298 Fixes #19133 2017-01-24 14:55:02 -08:00
Matt Bierner 4e7666da14 Fix relative links in markdown preview 2017-01-24 11:41:18 -08:00
Matt Bierner 93c4b5f077 Fixes #19093 2017-01-23 14:12:52 -08:00
Matt Bierner 6053021a6c Split up and rename Markdown Scroll Sync Settings (#19077)
Splits the markdown scroll sync settings to be more granular.
2017-01-23 11:59:12 -08:00
Matt Bierner 0451361010 Fixes #19070 2017-01-23 11:55:35 -08:00
Matt Bierner bc27d5c88e Restore double click to switch to editor behavior 2017-01-22 01:04:18 -08:00
Matt Bierner 5bf8cc7618 Add Markdown Preview to Editor Scroll Syncronization
Adds an initial implementation of scroll synrconization from the markdown preview to the editor. When the preview is scrolled, automatically scrolls the editor to reveal the same location.

This required adding a new supported reveal type `AtTop` in our API. This is already supported and used internally, but not really exposed in the public apis (except for the `revealLine` command).
2017-01-22 00:47:06 -08:00
Matt Bierner dc614f212d Cleanup markdown extension (#18951)
* Splits symbol provider to own file
* Removes duplicate frontmatter logic
2017-01-20 15:20:37 -08:00
Matt Bierner 94909e76d0 Fixes #18946 (#18948) 2017-01-20 13:22:41 -08:00
Matt Bierner d85dc993f9 Support Local File Links from the Markdown Preview (#18824)
* Support Local File Links from the Markdown Preview

Fixes #989

**Bug**

* `file://` links do not work in the markdown preview.
* `./file` and `/file` and `file` links do not work in the markdown preview.

**Fix**
For the first issue, allow `file://` links explicitly.

Add a custom link validator. If the incoming link has no scheme, try to resolve it relative to the current file or workspace. Likes like `/file` are relative to the workspace, while links like `file` or `./file` are relative to the current file.

* Fix reveal of source line on load in markdown preview
2017-01-20 12:44:09 -08:00
Matt Bierner b5ae881b26 Add Markdown Document Link Provider To Support Local Links (#18821)
* Support []() links

* Fix for file switching

* Fix local links with hash fragments
2017-01-20 11:36:34 -08:00
Joao Moreno ebba80143b Merge branch 'markdown-outline' of https://github.com/joaomoreno/vscode into joaomoreno-markdown-outline 2017-01-20 11:45:55 +01:00
Matt Bierner cc4833d868 Improve preview to editor mapping (#18816) 2017-01-19 16:11:34 -08:00
Matt Bierner b29ef9b4e8 Prototyping Markdown Preview Synchronization With Editors (#18762)
* Adds command to post a message to an html preview

**Bug**
There is currently no easy way to communicate with an html preview document after the preview has been created.

**Fix**
Adds a command called `vscode.htmlPreview.postMessage` to post a message to a visible html preview. This message will only be posted if the target preview is visible.

Inside the preview, the event is recieved using the standard dom event:

* Remove logging

* proto

Continue proto

* clean up rendering

* Gate prototype

* Fix gating

* Remove public command

* Change setting name

* Added current position indicator

* Reveal center
2017-01-18 17:58:45 -08:00
Matt Bierner 5dc2fb8c30 Maintain Markdown Preview Scroll Position on Window Resize (#18760)
* proto

Continue proto

* Basic implementation
2017-01-18 15:42:32 -08:00
Matt Bierner 9721d92af8 Fixed named headers for markdown preview (#18759) 2017-01-18 14:17:26 -08:00
Matt Bierner c932846c67 Wrapping in Markdown Preview (#17361)
* Improve markdown Wrapping

Includes a few improvements to the markdown preview

* Use breakword by default to break up very long words
* When `editor.worWrap` is enabled, wrap code blocks inside of the html preview.
* Reverts https://github.com/Microsoft/vscode/commit/41467b74b7e486f3a5857d3cc0ab15d85a2b7a84 . This change is adding an 20px margin to the left of any html content. I believe the html content itself should be responsible for adding this padding and should normally fill the entire screen.
* Better centers markdown preview content

* Move padding to default webview style

* Remove padding change for now
2017-01-12 16:29:27 -08:00
Matt Bierner 7baf789eef Generate Line Number in Markdown Output HTML
Adds basic line number data to the output html of the markdown renderer
2017-01-09 15:04:47 -08:00
Joao Moreno d421cf5ef9 fix regex to catch pound signs at the end 2016-12-13 09:20:40 +01:00
Joao Moreno 19578fbf23 delay markdown require 2016-12-13 09:11:00 +01:00
Joao Moreno 213546688a remove console.log 2016-12-09 14:35:16 +01:00
Joao Moreno 95a674c09e outline support for markdown 2016-12-09 14:32:22 +01:00
Matt Bierner 0fe7046f49 Enable Strict Null Checks and Use Lib References in Markdown Extension (#16346)
Makes a few changes to the markdown extension:

* Enables explicit null checks.
* Enables no implicit any checks.
* Switch to using TS 2.0 lib files.

This change required removing the mocha declaration from the shared `declare.d.ts`. Everything seems to compile fine without it.
2016-12-02 11:07:40 -08:00
Matt Bierner 0c6333e604 Add font settings for markdown preview (#16302)
Fixes #4641

Adds basic settings for controlling the markdown preview font. We already support this with custom css, but these settings are similar to what the editor and integrated terminal expose and allow for a few basic customizations. Custom style sheets will override these.
2016-12-01 12:55:00 -08:00
Matt Bierner b88a89c996 Allow markdown preview to scroll past content (#15919)
* Allow markdown preview to scroll past content

Issue #15795

Allows the markdown preview to scroll past its contents, like we do with the editor.

Closes #15795

* Toggle preview scroll beyond using editor.scrollBeyondLastLine
2016-11-29 14:51:15 -08:00
Matt Bierner 1957e44186 Delete emacs tmp file :( 2016-11-14 10:36:09 -08:00
Matt Bierner eb563582f4 Add yaml front matter support for Markdown (#15218)
* Add language support for yaml front matter to markdown grammar

* Add option to strip yaml front matter from preview

* Use enum for setting instead of boolean

* Better names

* Fix merge error
2016-11-11 15:09:32 -08:00
Joao Moreno 2bb3dd5d95 enable duplicate imports tslint rule 2016-11-11 17:02:08 +01:00
Johannes Rieken 093cd8b2a3 enable integration tests again, cleanup a little of the ///-reference mess, #14059 2016-10-20 12:04:01 +02:00
Johannes Rieken 69a30b6531 tsfmt - extensions/markdown 2016-10-08 09:33:01 +02:00
kieferrm 6b01b4c0d8 lookup of custom style sheets, fixes #8287 2016-06-30 14:50:58 -07:00
kieferrm a1f6aadfee Change default value from null to []; fixed #8283 2016-06-30 12:45:47 -07:00
Johannes Rieken 315f8c83bf on config changes, only update preview documents, fixes #8491 2016-06-29 13:52:06 +02:00
Johannes Rieken 0a386aea9c md extension should set baseUrl to document uri, webview should not override user baseUrl, fixes #7898 2016-06-27 13:59:16 +02:00
kieferrm b985edc9f5 introduce activation telemetry 2016-06-21 20:32:50 -07:00
kieferrm b9b2a6d895 refactoring 2016-06-21 20:31:27 -07:00
kieferrm 3410cb13ac fix double quotes 2016-06-21 20:26:32 -07:00
kieferrm 7e72a4d17a fix toggle markdown preview/source \w keybinding 2016-06-21 20:22:31 -07:00
Johannes Rieken f23877c4ed md - differentiate between showPreview and showSource
having two distinct commands allows us to have a context menu action in the explorer to show a preview
2016-06-17 11:23:17 +02:00
Johannes Rieken 6a1b806b3d fix update regression 2016-06-16 17:59:13 +02:00