提交 880320fd 编写于 作者: J Jacob Schatz

Add Readme rendering by checking out the `md` ext.

上级 dca28c94
......@@ -12,11 +12,20 @@ let RepoService = {
this.url = url;
},
paramsWithRich(url) {
// copy the obj so we don't modify perm.
let params = JSON.parse(JSON.stringify(this.params));
if(url.substr(url.length-2) === 'md') {
params.params.viewer = 'rich';
}
return params;
},
getContent(url) {
if(url){
return axios.get(url, this.params);
return axios.get(url, this.paramsWithRich(url, params));
}
return axios.get(this.url, this.params);
return axios.get(this.url, this.paramsWithRich(this.url, this.params));
},
getBase64Content(url) {
......
......@@ -67,6 +67,13 @@ header {
height: 70vh;
margin-top: -5px;
}
#binary-viewer {
height: 70vh;
overflow: auto;
margin-top: -5px;
margin-left: 10px;
}
}
#view-toggler {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册