Commit Graph

97 Commits

Author SHA1 Message Date
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
Matt Bierner
6e758c483b Use enum for md previewFrontMatter setting closes #16185 (#16188) 2016-11-29 09:49:20 -08:00
Matt Bierner
9ee2ad1258 Extract markdown decs strings for #13102 (#16177) 2016-11-28 15:10:07 -08:00
Matt Bierner
7320059e5c Don't translate Markdown.category Closes #16087 (#16159) 2016-11-28 12:48:23 -08:00
Daniel Imms
cbc0c0e66c Make cmd+k clear terminal on Mac
Fixes #12585
2016-11-22 17:49:31 -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
Johannes Rieken
cf5c011529 Fix our snippets to be text mate compatible 2016-11-11 17:13:36 +01:00
Joao Moreno
2bb3dd5d95 enable duplicate imports tslint rule 2016-11-11 17:02:08 +01:00
Matt Bierner
5d8a9c6b42 Fix Markdown Colorization of Indented Block Quotes (#15220)
Issue #12948

**Bug**
- Block quotes ar not colorized if they start with a space. Up to three spaces should be supported (4 spaces makes it a code block)
- The second line of blocks quotes should be able to have any number of leading spaces.

**Fix**
Add support for both of these cases

Closes #12948
2016-11-10 16:42:32 -08:00
Matt Bierner
5931743a01 Fix Fenced Code Syntax Highlighting in Markdown Leaking (#14626)
* Use while in fenced code blocks to prevent breakout

* Fix a few edge cases for code blocks
2016-11-10 15:57:44 -08:00
Daniel Imms
a28dc215af Remove rootDir from the markdown ext's tsconfig
This was causing the output's folder structure to be based on the root of the
vscode project. This bring it in line with the other bundled extensions.

Fixes #15184
2016-11-09 14:14:31 -08:00
Faustino Aguilar
644b6c6b56 Support HTML comments in Markdown (#14573)
Because Java comment syntax is not valid in Markdown.
2016-11-08 14:14:36 -08:00
Matt Bierner
79a695b91d Improve Markdown Syntax Highlighting of Nested Lists (#14634)
**bug**
Indented lists in markdown stop highlighting after four indents, even if they are nested.

**Fix**
Allow lists to also match the start of the line instead of the anchor point in their while clause. This ensure that each list element can consume up to three spaces at each level.
2016-11-08 14:04:19 -08:00
Matt Bierner
603e08d62d Improve Markdown Html Block Colorization (#12696)
* Add rule for html comment in blocks

* Match common mark spec for html comments

* Updating tests and fixing some token names

* Fix style and script blocks

* Fix test file results

* Fixed markdown tests for new html logic
2016-11-08 10:38:33 -08:00
Matt Bierner
3eacbae040 Highlight Markdown Image Starting ! Punctuator (#12841)
* Highlight Markdown Image Starting ! Puctuator

Issue #12835

Adds highlighting for the `!` that defines a markdown image link. This is colored the same as the `[` after it.

Closes #12835

* Fixed highlight test
2016-11-07 16:03:49 -08:00
Martin Aeschlimann
2db37ea17a Wrong highlighting for angle bracket syntax in embedded language. Fixes #14551 2016-10-27 12:04:54 +02:00
Martin Aeschlimann
7bdc667cd4 Change HTML grammar to be more precise (embedded modes). fixes #14295 2016-10-24 23:19:07 +02:00
Benjamin Pasero
4384310ab2 'Open Preview' button for markdown files is not available anymore (fixes #13476) 2016-10-24 08:32:25 +02: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
Kai Maetzel
37cffbd031 Merge pull request #11066 from eklavyamirani/master
Fixed: Markdown syntax highlighting to support alternative header styles
2016-09-26 17:44:21 -07:00
Matt Bierner
5c32264d0e Update markdown syntax highlighing test results 2016-09-26 10:50:58 -07:00
Matt Bierner
0b70faeec6 Fix colorization of markdown links and inlines inside of lists and quotes
Issue #12344

**Bug**
Current colorization rules are too relaxed. Links inside lists of block quotes for example end up getting colored differently than normal links.

**Fix**
- Add a scope to the textmate markdown grammar so that we can identify the symbol that starts a list or quote.
- Remove text colorization rule for lists and quotes since this just duplicates the normal text color.
- Only apply special puctuator colorization to the start symbol for lists and quotes
2016-09-26 10:50:58 -07:00
Matt Bierner
93d16ef30a Fix colorization for markdown indented paragraphs
Issue #8264

**Bug**
Indented paragraphs are not highlighted in markdown files. Up to three spaces are allowed before the first non space character.

**Fix**
Add rule to consume optional spaces before paragrpah start.

closes #8264
2016-09-26 10:49:47 -07:00
Matt Bierner
265c025bbf Use blankline to delimit html block in markdown colorization
**Bug**
Issue #7725

Nested html is not colorized properly for markdown:

```md
<div class="custom-class" markdown="1">
  <div>
    nested div
  </div>
</div>
```

**Fix**
According to the commonmark spec, general html blocks end with a blank line: http://spec.commonmark.org/0.25/#html-blocks

This change relaxes the while so that we only check for blanklines, instead of trying to match the start tag (which fails when nesting elements)
2016-09-26 10:48:54 -07:00
Matt Bierner
102adb766e Also support any number of spaces after end of closing fenced code block 2016-09-26 10:47:31 -07:00
Matt Bierner
69f2e874fc Fix Markdown Colorization for Fenced Code Blocks When End Fence Is Prefixed by Spaces
Issue #8636

**Bug**
Fenced code block closing tags break colorization if they are prefixed with spaces. According to the commonmark spec, up to three spaces are allowed.

**Fix**
Update defintion of fenced code block closing tag to support spaces.

Closes #8636
2016-09-26 10:47:31 -07:00
Matt Bierner
90d58f4909 Fix colorization of html prefixed by spaces in markdown files
Issue #12289

**Bug**
Html tags prefixed by 1 to 4 spaces are not colorized properly

**Fix**
Consume optional leading whitespace when matching html tags instead of only starting from previous match location

closes #12289
2016-09-26 10:46:00 -07:00
Matt Bierner
5169a9806a Add Syntax Highlighting for C# Code in Markdown files
Adds c# to the list of language highlighted in markdown fenced code blocks. You must have a c# language extension install for this to work.

Closes #7003
2016-09-26 10:44:14 -07:00
Matt Bierner
3b8ec4a12f Fix Markdown Preview Code in Header Font Size
**Bug**
In Markdown preview, code blocks in headers are the wrong font size.

**Fix**
Specify that code blocks in headers should inherit their font-size, instead of brining their own.
2016-09-26 10:35:25 -07:00
Matt Bierner
9e28d5764c Show Markdown Preview Menu Button For any File Opened as Markdown
Issue #7638

**Bug**
Open a `.txt` file containing markdown in VSCode. Select the editor language as `markdown` and the highlighing kicks in, but there is no preview button for the file.

**Fix**
Base display of the markdown preview button on `resourceScheme` instead of `resourceLangId`.

Closes #7638
2016-09-22 11:06:32 -07:00
kieferrm
aeda1791fe update tests results for the new version of the textmate engine 2016-09-21 22:17:16 -07:00
Alex Dima
91ff124083 Fix failing integration tests 2016-09-21 17:01:23 +03:00
Eklavya Mirani
2e886c0708 fixed broken markdown tests. 2016-08-28 23:20:58 +05:30
Eklavya Mirani
9aff1d0f74 Added the --- seperator to the paragraph rule
to allow heading-setext.2 rule to be recognized
2016-08-28 16:31:02 +05:30
Eklavya Mirani
45fbd00dd5 Moved TM Markdown seperator rule below the Paragraph
rule to fix the alt heading 2 syntax highlighting.
2016-08-27 13:55:51 +05:30
Martin Aeschlimann
4a13944af6 Migrate all other languages to language-configuration.json 2016-07-21 20:30:37 +02:00
Daniel Imms
9900f278ab Proper copy and paste support for integrated terminal
Fixes #6451
2016-07-11 15:13:13 -07:00
Alex Dima
d5862e8dba Clean extensions OSSREADME.json since the tool now can scan all npm-shrinkwrap.json files 2016-07-07 12:36:49 +03:00
Benjamin Pasero
4e72dcc359 make colorization tests happy for markdown 2016-07-02 14:31:05 +02:00
kieferrm
1f98af0f91 corect oss library version infomation 2016-07-01 14:19:00 -07:00
kieferrm
a1c2fcb9bd Add category, fixes #8271 2016-07-01 12:05:44 -07:00
Andre Weinand
ea6eae40e0 update OSSREADME from npm-shrinkwrap 2016-07-01 15:21:42 +02:00
kieferrm
9d50ac3f78 Add windows specific guidance 2016-06-30 16:45:27 -07:00