Skip to content

Commit

Permalink
Merge pull request #5 from shd101wyy/0.1.1
Browse files Browse the repository at this point in the history
0.1.1
  • Loading branch information
shd101wyy authored Jun 15, 2017
2 parents 6d13a1d + 15f1fa4 commit 93748f2
Show file tree
Hide file tree
Showing 17 changed files with 928 additions and 147 deletions.
4 changes: 3 additions & 1 deletion dependencies/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ I managed many libraries by myself instead of through npm to reduce overall file
"remarkable": "1.7.1",
"JavaScript-MD5": "2.7.0",
"katex": "0.7.1",
"jsonic": "0.3.0"
"jsonic": "0.3.0",
"crypto-js": "3.9.1-1",
"jquery-modal": "0.8.0"
}
```

Expand Down
3 changes: 3 additions & 0 deletions dependencies/crypto-js/crypto-js.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dependencies/jquery-modal/jquery.modal.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions dependencies/jquery-modal/jquery.modal.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 30 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,22 @@
{
"command": "markdown-preview-enhanced.openPreview",
"title": "Markdown Preview Enhanced: Open Preview"
},
{
"command": "markdown-preview-enhanced.openImageHelper",
"title": "Markdown Preview Enhanced: Image Helper"
}
],
"keybindings": [
{
"command": "markdown-preview-enhanced.openPreview",
"key": "shift+ctrl+m",
"when": "editorLangId == markdown"
},
{
"command": "markdown-preview-enhanced.openImageHelper",
"key": "shift+ctrl+i",
"when": "editorLangId == markdown"
}
],
"configuration": {
Expand All @@ -51,6 +60,11 @@
"default": true,
"type": "boolean"
},
"markdown-preview-enhanced.singlePreview": {
"description": "Open Only One Preview",
"default": true,
"type": "boolean"
},
"markdown-preview-enhanced.enableTypographer": {
"description": "Enable smartypants and other sweet transforms.",
"default": false,
Expand Down Expand Up @@ -154,6 +168,20 @@
"description": "Accepted protocols followed by `://` for links.",
"default": "http, https, atom, file",
"type": "string"
},
"markdown-preview-enhanced.imageFolderPath": {
"description": "When using Image Helper to copy images, by default images will be copied to root image folder path '/assets'",
"default": "/assets",
"type": "string"
},
"markdown-preview-enhanced.imageUploader": {
"description": "You can choose different image uploader to upload image",
"default": "imgur",
"type": "string",
"enum": [
"imgur",
"sm.ms"
]
}
}
}
Expand All @@ -168,6 +196,7 @@
"dependencies": {
"cheerio": "0.15.0",
"gray-matter": "^2.1.1",
"request": "^2.81.0",
"temp": "^0.8.3",
"uslug": "^1.0.4"
},
Expand All @@ -180,4 +209,4 @@
"typescript": "^2.0.3",
"vscode": "^1.0.0"
}
}
}
8 changes: 8 additions & 0 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ export class MarkdownPreviewEnhancedConfig {

public readonly protocolsWhiteList: string

/**
* image helper
*/
public readonly imageFolderPath: string
public readonly imageUploader: string

private constructor() {
const config = vscode.workspace.getConfiguration('markdown-preview-enhanced')

Expand All @@ -43,6 +49,8 @@ export class MarkdownPreviewEnhancedConfig {
this.codeBlockTheme = config.get<string>('codeBlockTheme')
this.previewTheme = config.get<string>('previewTheme')
this.protocolsWhiteList = config.get<string>('protocolsWhiteList')
this.imageFolderPath = config.get<string>('imageFolderPath')
this.imageUploader = config.get<string>('imageUploader')
}

public isEqualTo(otherConfig: MarkdownPreviewEnhancedConfig) {
Expand Down
Loading

0 comments on commit 93748f2

Please sign in to comment.