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).
* 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
* 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
* 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
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:...>`
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
* 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
- 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
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.
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.
* 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