Commit Graph

291 Commits

Author SHA1 Message Date
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
c8196b5ee5 Fixes #19126 2017-01-24 13:58:52 -08:00
Matt Bierner
4e7666da14 Fix relative links in markdown preview 2017-01-24 11:41:18 -08:00
Matt Bierner
a9424c71e4 Improve markdown preview line indicator colors 2017-01-23 15:24:53 -08:00
Matt Bierner
93c4b5f077 Fixes #19093 2017-01-23 14:12:52 -08:00
Matt Bierner
0309c46454 Sort markdown settings 2017-01-23 14:08:14 -08:00
Matt Bierner
a18fe04303 Add throttle for markdown scroll sync 2017-01-23 13:51:28 -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
a02320ba80 Fixes md preview to editor sync when before first element in preview (#18959)
* Fixes md preview to editor sync when before first element in preview

* Fix potential undef reference
2017-01-20 17:23:21 -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
Morag S
22cc4a1ce7 Markdown fixes (#18704)
* Fix typos

* Add Go, Rust and Scala

* Adjust Go, Rust and Scala's logic as per #17591
2017-01-20 12:51:09 -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
e3b3959d8f Remove droid sans fallback from default markdown font fallback 2017-01-18 22:05:04 -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
3d71a3254b Simplify markdown paragraph logic (#18531)
* Simplify markdown paragraph logic

* Fix for alt headers
2017-01-13 23:24:32 -08:00
Matt Bierner
cf3d092b2e Fixes #11480 (#18532) 2017-01-13 15:52:41 -08:00
Matt Bierner
1bbe4342d7 Fixes #18530 2017-01-13 13:57:28 -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 41467b74b7 . 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
Alex Dima
51b5727501 Merge remote-tracking branch 'origin/master' into alex/tokenization 2017-01-06 17:06:26 +01:00
Matt Bierner
83db3cad0c Fix Autolink Syntax Highlighting in Markdown (#18201)
Fixes #18197

**Bug**
Autolinks that start a line in markdown are currently parsed as as html content

**Fix**
Restrict the html element parser a little more so that we don't match tags html tags that look like `<scheme:...>`
2017-01-05 17:03:39 -08:00
Alex Dima
ebc43b3e8b Merge remote-tracking branch 'origin/master' into alex/tokenization 2017-01-05 12:31:43 +01:00
Alex Dima
90d74c59aa Use hex colors in themes integration tests 2017-01-05 09:47:08 +01:00
Alex Dima
10f68352a0 Themes integration tests 2017-01-04 22:44:08 +01:00
Matt Bierner
a2ae9109e5 Fix markdown syntax highlighting for script or style html elements with blank lines (#18116)
Fixes #18069

**Bug**
Script and style blocks inside markdown cannot contain blank lines

**fix**
Add a specific rule for script, style, and pre blocks according to the common mark spec: http://spec.commonmark.org/0.27/#html-block
2017-01-04 11:44:07 -08:00
Matt Bierner
31e1aebf30 Fix markdown colorization tests 2017-01-03 11:15:05 -08:00
Josh Peng
b9a362a185 Improve Markdown code block tokens (#17591)
* Improve Markdown code block tokens

Code blocks without a language weren't tokenized.
Code blocks didn't have their ending ``` punctuation tokenized.
Code blocks used to only have one token. Now each block has the following tokens available for syntax highlighters:
- Starting and ending ``` punctuations
- Code block's language setting
- Code snippet

* Variable whitespace for MD code block ``` token

Allow for variable amount of whitespacing before ``` code blocks

* Reorder raw blocks

Raw blocks were preventing tokenizing as languaged blocks. Putting them on bottom resolves this.

* Fix MD block detection when following paragraph

Used to require a new line inbetween ``` code blocks and preceding paragraph text.

* Prevent broken language grammar leaks in MD fences

Prevents leaks in MD code fences while also capturing the closing fence punctuations.

* Update Markdown tokenizer test file
2017-01-03 10:03:16 -08:00
Alex Dima
8998f7a53d Adopt new vscode textmate 2017-01-03 15:36:08 +02:00
Matt Bierner
4bd5fc1d5e Fixes #17537 - serif fonts in markdown preview on some systems 2016-12-19 14:49:54 -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
Sara Itani
fbbaa23180 Merge pull request #16502 from mousetraps/i3746
Fix markdown + PHP fenced code blocks
2016-12-05 15:28:20 -08:00
Sara Itani
3c21bf9cd2 Fix markdown + PHP fenced code blocks
- previously PHP wasn't working at all because we don't appear to properly support grammar injections. This issue was addressed by pointing to a specific repository key (#languages)
- ensure "fuzzy" syntax highlighting for PHP/HTML code so that script start tags are not required
2016-12-05 04:31:52 -08: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
Garrett Serack
d1e9f7339e allow text after the language id in a markdown codeblock (consistent with github, the md preview window and other gfm parsers) (#16239) 2016-11-29 14:49:41 -08:00