Skip to content

Commit

Permalink
Upgrade mume to version 0.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
shd101wyy committed Mar 7, 2018
1 parent 28ebe8d commit b6638c3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@
"package": "vsce package"
},
"dependencies": {
"@shd101wyy/mume": "^0.3.0"
"@shd101wyy/mume": "^0.3.1"
},
"devDependencies": {
"@types/jquery": "^3.2.17",
Expand Down
5 changes: 3 additions & 2 deletions src/config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as vscode from "vscode"
import {MarkdownEngineConfig} from "@shd101wyy/mume"
import { MathRenderingOption } from "../../mume/out/src/markdown-engine-config";

export class MarkdownPreviewEnhancedConfig implements MarkdownEngineConfig {
public static getCurrentConfig() {
Expand All @@ -15,7 +16,7 @@ export class MarkdownPreviewEnhancedConfig implements MarkdownEngineConfig {
public readonly enableExtendedTableSyntax: boolean
public readonly enableCriticMarkupSyntax: boolean
public readonly frontMatterRenderingOption:string
public readonly mathRenderingOption: string
public readonly mathRenderingOption: MathRenderingOption
public readonly mathInlineDelimiters: Array<string[]>
public readonly mathBlockDelimiters: Array<string[]>
public readonly codeBlockTheme: string
Expand Down Expand Up @@ -50,7 +51,7 @@ export class MarkdownPreviewEnhancedConfig implements MarkdownEngineConfig {
this.enableCriticMarkupSyntax = config.get<boolean>('enableCriticMarkupSyntax')
this.frontMatterRenderingOption = config.get<string>('frontMatterRenderingOption')
this.mermaidTheme = config.get<string>('mermaidTheme')
this.mathRenderingOption = config.get<string>('mathRenderingOption')
this.mathRenderingOption = config.get<string>('mathRenderingOption') as MathRenderingOption
this.mathInlineDelimiters = config.get<Array<string[]>>('mathInlineDelimiters')
this.mathBlockDelimiters = config.get<Array<string[]>>('mathBlockDelimiters')
this.codeBlockTheme = config.get<string>('codeBlockTheme')
Expand Down
5 changes: 2 additions & 3 deletions src/preview-content-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export class MarkdownPreviewEnhancedView implements vscode.TextDocumentContentPr
return ""
} else {
editor.edit((edit)=> {
edit.insert(new vscode.Position(i+1, 0), `<!-- code_chunk_output -->\n\n${result}\n\n<!-- /code_chunk_output -->\n`)
edit.insert(new vscode.Position(i+1, 0), `\n<!-- code_chunk_output -->\n\n${result}\n\n<!-- /code_chunk_output -->\n`)
})
return ""
}
Expand All @@ -116,9 +116,8 @@ export class MarkdownPreviewEnhancedView implements vscode.TextDocumentContentPr
for (let i = 0; i < visibleTextEditors.length; i++) {
const editor = visibleTextEditors[i]
if (editor.document.uri.fsPath === filePath) {

let codeChunkOffset = 0,
targetCodeChunkOffset = codeChunkData.options['code_chunk_offset']
targetCodeChunkOffset = codeChunkData.normalizedInfo.attributes['code_chunk_offset']

const lineCount = editor.document.lineCount
for (let i = 0; i < lineCount; i++) {
Expand Down

0 comments on commit b6638c3

Please sign in to comment.