@@ -4,7 +4,7 @@ import { HackMDTreeViewProvider } from './../tree/index';
44import { NoteTreeNode } from './../tree/nodes' ;
55import { MdTextDocumentContentProvider } from './../mdTextDocument' ;
66import { refreshHistoryList } from './../utils' ;
7- import { API , apiExportType } from './../api' ;
7+ import { API , ExportType } from './../api' ;
88
99export async function registerTreeViewCommands ( context : vscode . ExtensionContext , store : Store ) {
1010 const hackMDTreeViewProvider = new HackMDTreeViewProvider ( store ) ;
@@ -13,7 +13,7 @@ export async function registerTreeViewCommands(context: vscode.ExtensionContext,
1313
1414 context . subscriptions . push ( vscode . commands . registerCommand ( 'clickTreeItem' , async ( label , noteId ) => {
1515 if ( label && noteId ) {
16- const content = await API . exportString ( noteId , apiExportType . MD ) ;
16+ const content = await API . exportString ( noteId , ExportType . MD ) ;
1717 if ( content ) {
1818 const uri = vscode . Uri . parse ( `hackmd:${ label } .md#${ noteId } ` ) ;
1919 const doc = await vscode . workspace . openTextDocument ( uri ) ;
@@ -25,7 +25,7 @@ export async function registerTreeViewCommands(context: vscode.ExtensionContext,
2525 context . subscriptions . push ( vscode . commands . registerCommand ( 'note.showPreview' , async ( node : NoteTreeNode ) => {
2626 const noteNode = node ;
2727 if ( noteNode . label && noteNode . noteId ) {
28- const content = await API . exportString ( noteNode . noteId , apiExportType . MD ) ;
28+ const content = await API . exportString ( noteNode . noteId , ExportType . MD ) ;
2929 if ( content ) {
3030 const uri = vscode . Uri . parse ( `hackmd:${ noteNode . label } .md#${ noteNode . noteId } ` ) ;
3131 vscode . commands . executeCommand ( 'markdown.showPreview' , uri ) ;
@@ -36,7 +36,7 @@ export async function registerTreeViewCommands(context: vscode.ExtensionContext,
3636 context . subscriptions . push ( vscode . commands . registerCommand ( 'note.showPreviewAndEditor' , async ( node : NoteTreeNode ) => {
3737 const noteNode = node ;
3838 if ( noteNode . label && noteNode . noteId ) {
39- const content = await API . exportString ( noteNode . noteId , apiExportType . MD ) ;
39+ const content = await API . exportString ( noteNode . noteId , ExportType . MD ) ;
4040 if ( content ) {
4141 const uri = vscode . Uri . parse ( `hackmd:${ noteNode . label } .md#${ noteNode . noteId } ` ) ;
4242 const doc = await vscode . workspace . openTextDocument ( uri ) ;
0 commit comments