Skip to content

Commit 56bcb74

Browse files
committed
fix(render): Disable markdown parsing when the file is an HTML
1 parent 01bbbaa commit 56bcb74

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/core/fetch/index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,12 @@ export function fetchMixin (proto) {
2727
// Abort last request
2828
last && last.abort && last.abort()
2929

30-
last = get(this.router.getFile(path) + qs, true, requestHeaders)
30+
const file = this.router.getFile(path)
31+
32+
last = get(file + qs, true, requestHeaders)
3133

3234
// Current page is html
33-
this.isHTML = /\.html$/g.test(path)
35+
this.isHTML = /\.html$/g.test(file)
3436

3537
const loadSideAndNav = () => {
3638
if (!loadSidebar) return cb()

src/core/render/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ export function renderMixin (proto) {
135135
callHook(this, 'afterEach', html, text => renderMain.call(this, text))
136136
}
137137
if (this.isHTML) {
138-
html = this.result
138+
html = this.result = text
139139
callback()
140140
next()
141141
} else {

0 commit comments

Comments
 (0)