Matt Bierner
7f1745027b
Re-use options from markdown engine instead of creating new options object
...
Fixes https://github.com/mjbvz/vscode-markdown-mermaid/issues/26
2019-01-25 11:48:25 -08:00
Phil Marshall
5fdc5c2675
factor documentlink extraction into separate function
2019-01-24 17:25:09 -06:00
Phil Marshall
b1de159292
added test for markdown image link underline
2019-01-22 18:46:55 -06:00
Phil Marshall
d372fa0697
md extension should underline images used as link description
2019-01-22 18:46:46 -06:00
Matt Bierner
59ce7f3b28
Fix markdown preview code highlighting
...
Fixes #66772
2019-01-21 14:09:30 -08:00
alexet
0798d13f10
Remove duplicate character from regex class
2019-01-16 17:56:17 +00:00
Matt Bierner
344f4fa361
Make sure we update the markdown document on config changes
2019-01-09 19:32:53 -08:00
Matt Bierner
758280cc47
Extract TokenCache
2019-01-09 19:27:41 -08:00
Matt Bierner
5496ba7617
Prevent possible race while initilizing markdown engine
2019-01-09 19:18:23 -08:00
Matt Bierner
1bbc0e3b4d
Deprecate the previewFrontMatter setting
...
Switch to always hiding the frontmatter and then allowing markdown-it plugins to render it properly if they wish. `previewFrontMatter: "show"` is also not very useful since it usually results in a jumble of text at the top of the file
This is required with the new performance work to avoid re-tokenizing the document multiple times during rendering
2019-01-09 19:05:55 -08:00
Matt Bierner
e325cce9bc
Fixing markdown unit tests
2019-01-09 18:15:34 -08:00
Matt Bierner
9140285092
Merge pull request #65953 from skprabhanjan/fix-65575
...
Fix-65575 MarkdownIt plugins (or Rules) called multiple times for one input
2019-01-09 17:41:47 -08:00
pkoushik
a6b761b033
fix-65575 Updated tokenize method - Returns cached token if exists or newly created token and cache it
2019-01-08 15:22:29 +05:30
pkoushik
eabf436c07
fix-65575 tokenize method cache update bug fixed
2019-01-04 20:13:27 +05:30
pkoushik
661d191638
fix-65575 tokenize method added
2019-01-04 20:07:21 +05:30
Rob Lourens
ef2547d547
replace void 0 with undefined
2019-01-03 11:20:19 -08:00
pkoushik
1ef045875d
fix-65575 Added CachedToken and implementation to use it
2019-01-03 11:56:11 +05:30
Matt Bierner
7086fb76ec
Take document as parameter instead document components
2019-01-02 11:56:39 -08:00
Prabhanjan S Koushik
55ebf93842
fix-65287 Added webviewManager.refresh() ( #65396 )
2018-12-19 11:05:57 -08:00
Matt Bierner
54386cc1f4
Fix word pattern
...
Too much escaping :0
2018-12-12 15:30:49 -08:00
Matt Bierner
66e07e14a4
Fix regexp
2018-12-12 15:18:46 -08:00
Matt Bierner
a637dd7261
Avoid unicode regexp literal
...
This breaks our minifier step
2018-12-12 13:27:08 -08:00
Matt Bierner
a2078fd559
Strict null auto add
2018-12-11 12:50:45 -08:00
Matt Bierner
100adeb3e9
Use more generic word pattern for markdown
...
Try to better support handle of unicode in markdown by using a word definition that use unicode character class
Fixes #15177
2018-12-10 18:24:10 -08:00
Matt Bierner
f52f29d65e
Add typings for markdown preview messages
2018-12-04 15:54:53 -08:00
Matt Bierner
a2893ce678
Fix markdown fragments when opening file in workspace
...
Fixes #64141
2018-12-04 15:42:17 -08:00
Matt Bierner
1feed6a23c
Delete unused typings file
2018-11-29 10:44:27 -08:00
Prabhanjan S Koushik
e05aa178d6
Fix 63749 - Markdown, U+2028, and "Go to Symbol in File..." ( #63936 )
...
* fix-63749 - Added UNICODE_NEWLINE_REGEX
* fix-63749 - Removed .skip for the test method
* fix-63749 Moved Replace to parse
2018-11-29 09:09:36 -08:00
Matt Bierner
2f9f0c35cc
Added failing test for #63749
...
Add skipped test for #63749 so someone can pick this up
2018-11-27 12:02:39 -08:00
Matt Bierner
4737e3efd1
Fixing TS 3.2 compile errors
2018-11-13 17:13:15 -08:00
Matt Bierner
e21df781db
Treat data: as a known markdown link scheme
...
Fixes #62142
2018-10-30 11:34:33 -07:00
Matt Bierner
b72c349e05
Don't try re-encoding vscode-resoure markdown links
...
Fixes #60374
Some markdown-it extensions end up reprocessing the same tokens multiple times. This can result in our link normalized being re-invoked on a link, which causes it to fail
Fix to to make sure that `vscode-resource` is a recongized link so that we don't try re-normalizing in these cases
2018-10-29 16:18:11 -07:00
Johannes Rieken
b343fcf6ab
declare proposed api usage only where actually being used
2018-10-24 12:27:59 +02:00
Sankt Petersbug
f2653c04cb
Fix Markdown Preview incorrectly encodes a link ( #61530 )
...
For known external scheme, the customized normalizeLink method use vscode.Uri to parse and create
the string representation of the link before caling the original normalizeLink method.
The toString method of vscode.Uri encodes the result by default, and this is unecessary since encoding
is handled by the original normalizeLink method.
Calls toString method with skipEncoding option.
Resolves : #60525
2018-10-22 15:41:22 -07:00
Ahmed Atito
6944a221c3
🐛 - Support C# in markdown preview code block syntax highlighting. ( #61291 )
2018-10-19 15:13:44 -07:00
Matt Bierner
1b812bade4
Don't re-encode markdown styles http uris
...
Fixes #60742
These uris should already be encoded. Don't try encoding them again which may cause the uri to become invalid
2018-10-17 18:49:18 -07:00
Matt Bierner
9e017425b3
Replace markdown-named-headers with custom version
...
Fixes #47537
Use our own version of markdown named headers. This fixes some bugs around handling duplicate headers
2018-10-08 16:04:47 -07:00
Matt Bierner
7d95e3e5f9
Support markdown link navigation when duplicate slugs exist
...
Fixes #59711
For a md document:
```md
# a
# a
- [a](#a)
- [next a](#a-1)
```
You can now click on the second link in the editor to navigate to the second `a` header. It is identified by being suffixed with `-1`.
2018-10-08 15:51:29 -07:00
Matt Bierner
f87369e1af
Treat json5 as json in the markdown preview
2018-10-05 13:06:37 -07:00
Matt Bierner
a529621b3d
Disable command uris in preview
...
We are now using the modern, message passing approach to handling actions in the markdown preview. No more need for command uris
2018-10-04 19:01:34 -07:00
Matt Bierner
6d5214053c
Fix local markdown document links for untitled files
...
Fixes #59523
2018-10-04 19:01:34 -07:00
Matt Bierner
e19c9ba82d
Addd option to open markdown preview links in markdown preview
...
Fixes #19339
2018-09-21 15:08:42 -07:00
Matt Bierner
a101ececf4
Remove onCommand from markdown preview
2018-09-21 15:08:41 -07:00
Matt Bierner
388a62fe12
Fix anchor links in markdown preview
2018-09-21 15:08:41 -07:00
Matt Bierner
7185906189
Reduce usage of postCommand in markdown preview
2018-09-21 15:08:41 -07:00
SteVen Batten
f8f4d3af30
improve markdown preview scroll sync ( #58852 )
...
* improve markdown preview scroll sync
2018-09-18 15:08:37 -07:00
Matt Bierner
4096b5d68e
Avoid uri parse warnings for markdown uris
...
Fixes #58566
We only support local file links or a small set of normal schemes, like `http` and `mailto`. Use this to avoid calling `Uri.parse` with scheme-less paths such as `Uri.parse('/images/cat.gif')`
2018-09-13 15:43:47 -07:00
Matt Bierner
2806df93e4
Try to keep one blank line after markdown block element folds
...
Fixes #58187
2018-09-07 13:48:44 -07:00
Matt Bierner
a118676a3b
Allow folding of html blocks in markdown files
...
Fixes #57505
2018-09-07 13:41:55 -07:00
Matt Bierner
5eab03cf75
Fix folding code blocks / lists with front matter
2018-09-07 11:36:38 -07:00