Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extract markdown into an extension #7656

Merged
merged 33 commits into from
Jun 16, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
2dfecbb
theme support in htmlPreview
kieferrm May 21, 2016
e2ea2dd
fix handling of achors without a workspace
kieferrm May 21, 2016
3112f9d
remove console output
kieferrm May 21, 2016
0b856de
prepackage markdown extension
kieferrm May 21, 2016
43a55c1
code hygiene
kieferrm May 21, 2016
cd18237
use initData
kieferrm May 21, 2016
ed5eb10
paragraphs stop at list item boundaries
kieferrm May 21, 2016
f3cc270
remove theme awareness opt-in
kieferrm May 23, 2016
2ac170e
fix hygiene issues
kieferrm May 23, 2016
1f49e3f
replay: disable built-in markdown
kieferrm Jun 9, 2016
dd3deaa
mimic default text bundle in textmate
kieferrm Jun 9, 2016
0a50d54
fix Abyss theme for markdown
kieferrm Jun 9, 2016
9b4a35f
fix Abyss theme for markdown
kieferrm Jun 9, 2016
c8cfe69
fix default themes for markdown
kieferrm Jun 9, 2016
2c57e61
fix Kimbie theme for markdown
kieferrm Jun 9, 2016
19d5099
fix monokai for markdown
kieferrm Jun 9, 2016
046907e
fix dimmed monokai for markdown
kieferrm Jun 9, 2016
e576243
fix quiet light theme for markdown
kieferrm Jun 9, 2016
f26ea0f
fix red theme for markdown
kieferrm Jun 13, 2016
4f3db60
fix solarized dark theme for markdown
kieferrm Jun 13, 2016
c3acb20
fix solarized-light theme for markdown
kieferrm Jun 13, 2016
fd87c3e
fix tomorrow night blue for markdown
kieferrm Jun 13, 2016
f53bc23
opacity trick to workaround, #5038
jrieken Jun 13, 2016
7465727
update preview on type, don't read document from disk
jrieken Jun 13, 2016
203ab96
whitespace issue
jrieken Jun 13, 2016
ae52d3f
:lipstick: use single quotes
jrieken Jun 14, 2016
bd8100a
use new label param when calling previewHtml
jrieken Jun 14, 2016
2ed9c43
use 'api' friendly css classes
kieferrm Jun 15, 2016
69b5713
use classList
kieferrm Jun 15, 2016
7ca2e8c
add timeout to avoid spamming
kieferrm Jun 15, 2016
7afe57d
add tomorrow.css to exclusion list for hygiene
kieferrm Jun 15, 2016
591d4f3
add OSS license details
kieferrm Jun 15, 2016
fe74885
temporarily 'fix' test failure
kieferrm Jun 15, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions build/gulpfile.hygiene.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ var copyrightFilter = [
'!**/*.sh',
'!**/*.txt',
'!**/*.xpm',
'!extensions/markdown/media/tomorrow.css'
];

var tslintFilter = [
Expand Down
1 change: 1 addition & 0 deletions build/npm/postinstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const extensions = [
'vscode-colorize-tests',
'json',
'configuration-editing',
'markdown',
'typescript',
'php',
'javascript',
Expand Down
102 changes: 102 additions & 0 deletions extensions/markdown/OSSREADME.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
// ATTENTION - THIS DIRECTORY CONTAINS THIRD PARTY OPEN SOURCE MATERIALS:
[
{
"name": "chriskempson/tomorrow-theme",
"version": "0.0.0",
"license": "MIT",
"isProd": true,
"repositoryURL": "https://github.com/chriskempson/tomorrow-theme"
},
{
"name": "markdown-it/markdown-it",
"version": "0.0.0",
"license": "MIT",
"isProd": true,
"repositoryURL": "https://github.com/markdown-it/markdown-it"
},
{
"name": "isagalaev/highlight.js",
"version": "0.0.0",
"license": "BSD",
"isProd": true,
"repositoryURL": "https://github.com/isagalaev/highlight.js",
"licenseDetail": [
"Copyright (c) 2006, Ivan Sagalaev",
"All rights reserved.",
"Redistribution and use in source and binary forms, with or without",
"modification, are permitted provided that the following conditions are met:",
"",
" * Redistributions of source code must retain the above copyright",
" notice, this list of conditions and the following disclaimer.",
" * Redistributions in binary form must reproduce the above copyright",
" notice, this list of conditions and the following disclaimer in the",
" documentation and/or other materials provided with the distribution.",
" * Neither the name of highlight.js nor the names of its contributors",
" may be used to endorse or promote products derived from this software",
" without specific prior written permission.",
"",
"THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY",
"EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED",
"WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE",
"DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY",
"DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES",
"(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;",
"LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND",
"ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT",
"(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS",
"SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
]
},
{
"name": "leff/markdown-it-named-headers",
"version": "0.0.0",
"license": "UNLICENSE",
"isProd": true,
"repositoryURL": "https://github.com/leff/markdown-it-named-headers",
"licenseDetail": [
"This is free and unencumbered software released into the public domain.",
"",
"Anyone is free to copy, modify, publish, use, compile, sell, or",
"distribute this software, either in source code form or as a compiled",
"binary, for any purpose, commercial or non-commercial, and by any",
"means.",
"",
"In jurisdictions that recognize copyright laws, the author or authors",
"of this software dedicate any and all copyright interest in the",
"software to the public domain. We make this dedication for the benefit",
"of the public at large and to the detriment of our heirs and",
"successors. We intend this dedication to be an overt act of",
"relinquishment in perpetuity of all present and future rights to this",
"software under copyright law.",
"",
"THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,",
"EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF",
"MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.",
"IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR",
"OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,",
"ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR",
"OTHER DEALINGS IN THE SOFTWARE.",
"",
"For more information, please refer to <http://unlicense.org/>"
]
},
{
"name": "textmate/markdown.tmbundle",
"version": "0.0.0",
"license": "TextMate Bundle License",
"repositoryURL": "https://github.com/textmate/markdown.tmbundle",
"licenseDetail": [
"If not otherwise specified (see below), files in this repository fall under the following license:",
"",
"Permission to copy, use, modify, sell and distribute this",
"software is granted. This software is provided \"as is\" without",
"express or implied warranty, and with no claim as to its",
"suitability for any purpose.",
"",
"An exception is made for files in readable text which contain their own license information,",
"or files where an accompanying file exists (in the same directory) with a \"-license\" suffix added",
"to the base-name name of the original file, and an extension of txt, html, or similar. For example",
"\"tidy\" is accompanied by \"tidy-license.txt\"."
]
}
]
26 changes: 26 additions & 0 deletions extensions/markdown/markdown.configuration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"comments": {
// symbol used for single line comment. Remove this entry if your language does not support line comments
"lineComment": "//",
// symbols used for start and end a block comment. Remove this entry if your language does not support block comments
"blockComment": [
"/*",
"*/"
]
},
// symbols used as brackets
"brackets": [
[
"{",
"}"
],
[
"[",
"]"
],
[
"(",
")"
]
]
}
163 changes: 163 additions & 0 deletions extensions/markdown/media/markdown.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

body {
font-family: "Segoe WPC", "Segoe UI", "SFUIText-Light", "HelveticaNeue-Light", sans-serif, "Droid Sans Fallback";
font-size: 14px;
padding-left: 12px;
line-height: 22px;
}

img {
max-width: 100%;
max-height: 100%;
}

a {
color: #4080D0;
text-decoration: none;
}

a:focus,
input:focus,
select:focus,
textarea:focus {
outline: 1px solid -webkit-focus-ring-color;
outline-offset: -1px;
}

hr {
border: 0;
height: 2px;
border-bottom: 2px solid;
}

h1 {
padding-bottom: 0.3em;
line-height: 1.2;
border-bottom-width: 1px;
border-bottom-style: solid;
}

h1, h2, h3 {
font-weight: normal;
}

a:hover {
color: #4080D0;
text-decoration: underline;
}

table {
border-collapse: collapse;
}

table > thead > tr > th {
text-align: left;
border-bottom: 1px solid;
}

table > thead > tr > th,
table > thead > tr > td,
table > tbody > tr > th,
table > tbody > tr > td {
padding: 5px 10px;
}

table > tbody > tr + tr > td {
border-top: 1px solid;
}

blockquote {
margin: 0 7px 0 5px;
padding: 0 16px 0 10px;
border-left: 5px solid;
}

code {
font-family: Menlo, Monaco, Consolas, "Droid Sans Mono", "Courier New", monospace, "Droid Sans Fallback";
font-size: 14px;
line-height: 19px;
}

.mac code {
font-size: 12px;
line-height: 18px;
}

code > div {
padding: 16px;
border-radius: 3px;
overflow: auto;
}

/** Theming */

.vscode-light {
color: rgb(30, 30, 30);
}

.vscode-dark {
color: #DDD;
}

.vscode-high-contrast {
color: white;
}

.vscode-light code {
color: #A31515;
}

.vscode-dark code {
color: #D7BA7D;
}

.vscode-light code > div {
background-color: rgba(220, 220, 220, 0.4);
}

.vscode-dark code > div {
background-color: rgba(10, 10, 10, 0.4);
}

.vscode-high-contrast code > div {
background-color: rgb(0, 0, 0);
}

.vscode-high-contrast h1 {
border-color: rgb(0, 0, 0);
}

.vscode-light table > thead > tr > th {
border-color: rgba(0, 0, 0, 0.69);
}

.vscode-dark table > thead > tr > th {
border-color: rgba(255, 255, 255, 0.69);
}

.vscode-light h1,
.vscode-light hr,
.vscode-light table > tbody > tr + tr > td {
border-color: rgba(0, 0, 0, 0.18);
}

.vscode-dark h1,
.vscode-dark hr,
.vscode-dark table > tbody > tr + tr > td {
border-color: rgba(255, 255, 255, 0.18);
}

.vscode-light blockquote,
.vscode-dark blockquote {
background: rgba(127, 127, 127, 0.1);
border-color: rgba(0, 122, 204, 0.5);
}

.vscode-high-contrast blockquote {
background: transparent;
border-color: #fff;
}
73 changes: 73 additions & 0 deletions extensions/markdown/media/tomorrow.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
/* Tomorrow Theme */
/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
/* Original theme - https://github.com/chriskempson/tomorrow-theme */

/* Tomorrow Comment */
.hljs-comment,
.hljs-quote {
color: #8e908c;
}

/* Tomorrow Red */
.hljs-variable,
.hljs-template-variable,
.hljs-tag,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class,
.hljs-regexp,
.hljs-deletion {
color: #c82829;
}

/* Tomorrow Orange */
.hljs-number,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params,
.hljs-meta,
.hljs-link {
color: #f5871f;
}

/* Tomorrow Yellow */
.hljs-attribute {
color: #eab700;
}

/* Tomorrow Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet,
.hljs-addition {
color: #718c00;
}

/* Tomorrow Blue */
.hljs-title,
.hljs-section {
color: #4271ae;
}

/* Tomorrow Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #8959a8;
}

.hljs {
display: block;
overflow-x: auto;
color: #4d4d4c;
padding: 0.5em;
}

.hljs-emphasis {
font-style: italic;
}

.hljs-strong {
font-weight: bold;
}
Loading