Skip to content

Commit 278a75e

Browse files
RomakitaQingWei-Li
authored andcommitted
fix(render): Disable markdown parsing when the file is an HTML (#403)
1 parent b8a4e6b commit 278a75e

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/core/fetch/index.js

+4-2
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

+1-1
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)