diff --git a/CHANGELOG.md b/CHANGELOG.md index 0aee7f8..4065666 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,60 +1 @@ -## v0.1.7 -* New design for prensentation mode. Multiple revealjs presentation themes are provided. -* Added `Welcome Page`. -* Update `Mume` to version `0.1.0`. - -## v0.1.6 -* [ ] Separate **core library** out from this extension. -* [x] Support Task List (TODO) for pandoc parser. Added click event for checkbox. -* [ ] Wavedrom support. -* [ ] Add `Welcome page`. -* [x] Add preview themes: `Medium`, `None`. -* [x] Add `Markdown Preview Enhanced: Extend Parser` command. -* [ ] Fix issue [#17](https://github.com/shd101wyy/vscode-markdown-preview-enhanced/issues/17#issuecomment-314016606). - -## July 4, 2017 -*Basically finished porting.* - -* Done [PhantomJS export](./docs/phantomjs.md). -* Done [pandoc parser](https://shd101wyy.github.io/markdown-preview-enhanced/#/pandoc?id=pandoc-parser) support. -* Added `Gothic`, `Newsprint`, and `Night` preview themes. - -## June 20, 2017 -* Done [Pandoc export](https://shd101wyy.github.io/markdown-preview-enhanced/#/pandoc-pdf). (Not tested). -* Done Markdown(GFM) export. (Not tested) -* Done [TOC](https://shd101wyy.github.io/markdown-preview-enhanced/#/toc) implementation. - > The vscode version is newer than the atom version. - > To ignore a heading from TOC, you need to set `{ignore: true}`. - > To add class and id, you need to set `{id:"...", class:"..."}`. -* Done Code Chunk implementation. Added two more options `modify_source` and `run_on_save`. Please check [this doc](./docs/code-chunk.md) for more information. -* Done [Customize CSS](https://shd101wyy.github.io/markdown-preview-enhanced/#/customize-css) support. -* Done `mermaid` configuration supoort. -* Done `MathJax` configuration support. -* Done `line-numbers`. Simply add `line-numbers` to code block(chunk) `class`. - -![](https://ooo.0o0.ooo/2017/06/20/594939ec162d9.png) - -## June 16, 2017 -* Done supporting [eBook export](https://shd101wyy.github.io/markdown-preview-enhanced/#/ebook). -* [@import](https://shd101wyy.github.io/markdown-preview-enhanced/#/file-imports) 70% done. Now support importing every external files except `.js` and `.pdf` files. -* Done implementing refresh button in preview. -* [Code Chunk](https://shd101wyy.github.io/markdown-preview-enhanced/#/code-chunk) implementation is now 60% done. LaTeX and JavaScript don't work yet. -Please note that Code Chunk of [Markdown Preview Enhanced for Atom](https://shd101wyy.github.io/markdown-preview-enhanced/#/code-chunk) is outdated. The syntax of the vscode version is the newest. You need to have `cmd` set to declare a code chunk. - - -![](https://ooo.0o0.ooo/2017/06/17/5944a2b03d954.png) - -## June 14, 2017 -* Scroll sync is partially done. -* Done supporting `mermaid`, `PlantUML` and `viz.js` (GraphViz). -* Done supporting `[TOC]`. -* Done supporting `MathJax` and `KaTeX`. -* Done sidebar TOC. -* Done back to top button. -* Done supporting front matter. -* Done supporting `reveal.js` presentation mode. Try inserting `` to your markdown. -* Done `Open in Browser`. -* Done HTML export. -* Done `prince` PDF export. -* Done `Image Helper`. -* Done supporting single preview. +Please go check the [project releases page](https://github.com/shd101wyy/vscode-markdown-preview-enhanced). \ No newline at end of file diff --git a/package.json b/package.json index 1504b34..f6b3938 100644 --- a/package.json +++ b/package.json @@ -326,7 +326,7 @@ "package": "vsce package" }, "dependencies": { - "@shd101wyy/mume": "^0.1.3" + "@shd101wyy/mume": "^0.1.5" }, "devDependencies": { "@types/jquery": "^2.0.46", @@ -337,4 +337,4 @@ "typescript": "^2.0.3", "vscode": "^1.0.0" } -} \ No newline at end of file +} diff --git a/src/extension.ts b/src/extension.ts index 4612eee..2f9c1c1 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -255,14 +255,14 @@ export function activate(context: vscode.ExtensionContext) { const sourceUri = vscode.Uri.parse(decodeURIComponent(uri)); href = decodeURIComponent(href) if (['.pdf', '.xls', '.xlsx', '.doc', '.ppt', '.docx', '.pptx'].indexOf(path.extname(href)) >= 0) { - utility.openFile(href) + utility.openFile(utility.addFileProtocol(href)) } else if (href.match(/^file\:\/\/\//)) { // openFilePath = href.slice(8) # remove protocal let openFilePath = utility.addFileProtocol(href.replace(/(\s*)[\#\?](.+)$/, '')) // remove #anchor and ?params... openFilePath = decodeURI(openFilePath) vscode.commands.executeCommand('vscode.open', vscode.Uri.parse(openFilePath), vscode.ViewColumn.One) } else { - utility.openFile(href) + utility.openFile(utility.addFileProtocol(href)) } } diff --git a/src/preview-content-provider.ts b/src/preview-content-provider.ts index ad6ae46..f57a8b9 100644 --- a/src/preview-content-provider.ts +++ b/src/preview-content-provider.ts @@ -318,7 +318,7 @@ export class MarkdownPreviewEnhancedView implements vscode.TextDocumentContentPr public phantomjsExport(sourceUri: Uri, type: string) { const engine = this.getEngine(sourceUri) if (engine) { - engine.phantomjsExport({fileType: type}) + engine.phantomjsExport({fileType: type, openFileAfterGeneration: true}) .then((dest)=> { vscode.window.showInformationMessage(`File ${path.basename(dest)} was created at path: ${dest}`) }) @@ -331,7 +331,7 @@ export class MarkdownPreviewEnhancedView implements vscode.TextDocumentContentPr public princeExport(sourceUri: Uri) { const engine = this.getEngine(sourceUri) if (engine) { - engine.princeExport({}) + engine.princeExport({openFileAfterGeneration: true}) .then((dest)=> { if (dest.endsWith('?print-pdf')) // presentation pdf vscode.window.showInformationMessage(`Please copy and open the link: { ${dest.replace(/\_/g, '\\_')} } in Chrome then Print as Pdf.`) @@ -360,7 +360,7 @@ export class MarkdownPreviewEnhancedView implements vscode.TextDocumentContentPr public pandocExport(sourceUri) { const engine = this.getEngine(sourceUri) if (engine) { - engine.pandocExport({}) + engine.pandocExport({openFileAfterGeneration: true}) .then((dest)=> { vscode.window.showInformationMessage(`Document ${path.basename(dest)} was created as path: ${dest}`) })