Small fixes

master
Thorsten Muerell 7 years ago
parent 85add9bb6b
commit da12eb698d

@ -29,7 +29,7 @@ export class BlockDetector {
} }
} else { } else {
while (!endLine.text.match(/;/) && endLine.lineNumber < doc.lineCount-1) { while (!endLine.text.match(/;/) && endLine.lineNumber < doc.lineCount-1) {
endLine = this.editor.document.lineAt(startLine.lineNumber+1) endLine = this.editor.document.lineAt(endLine.lineNumber+1)
} }
} }

@ -6,6 +6,7 @@ export class TextDocumentContentProvider implements vscode.TextDocumentContentPr
public provideTextDocumentContent(uri: vscode.Uri): string { public provideTextDocumentContent(uri: vscode.Uri): string {
if (!this._data) return this.errorSnippet(); if (!this._data) return this.errorSnippet();
if (this._data['rows'].length == 0) return this.errorSnippet();
let styles = `<style> let styles = `<style>
table { table {
@ -74,12 +75,7 @@ export class TextDocumentContentProvider implements vscode.TextDocumentContentPr
<body> <body>
<table> <table>
<tr> <tr>
<th>ID</th> <td>No results found!</td>
<th>Name</th>
</tr>
<tr>
<td>1</td>
<td>Foobar</td>
</tr> </tr>
</table> </table>
</body>`; </body>`;

Loading…
Cancel
Save