forked from Gitlink/forgeplus-react
md文件要用Markdown渲染
This commit is contained in:
parent
93ba9c6a98
commit
8a5a7a0647
|
@ -227,6 +227,10 @@ function CoderDepot(props){
|
|||
}
|
||||
})
|
||||
}
|
||||
|
||||
let n = fileInfo && fileInfo.name;
|
||||
const mdFlag = n && n.substring(n.length-3,n.length) === ".md";
|
||||
|
||||
return(
|
||||
<WhiteBack>
|
||||
<UpdateDescModal desc={desc} website={website} lesson_url={lesson_url} visible={openModal} onCancel={()=>setOpenModal(false)} onOk={okUpdate}/>
|
||||
|
@ -346,6 +350,7 @@ function CoderDepot(props){
|
|||
{...props}
|
||||
detail={fileInfo}
|
||||
readOnly={readOnly}
|
||||
md={mdFlag}
|
||||
onEdit={onEdit}
|
||||
currentBranch={branchName || (projectDetail && projectDetail.default_branch)}
|
||||
></CoderRootFileDetail>
|
||||
|
|
|
@ -176,9 +176,9 @@ class CoderRootFileDetail extends Component {
|
|||
current_user,
|
||||
isManager,
|
||||
isDeveloper,
|
||||
md,
|
||||
currentBranch,
|
||||
platform
|
||||
platform,
|
||||
md
|
||||
} = this.props;
|
||||
const { language, languages, description } = this.state;
|
||||
let flag = current_user && current_user.login && (isManager || isDeveloper);
|
||||
|
|
|
@ -292,6 +292,7 @@
|
|||
border-radius: 4px;
|
||||
.ant-dropdown-menu-item{
|
||||
border-radius: 8px;
|
||||
text-align: left;
|
||||
a{
|
||||
width: 350px;
|
||||
overflow: hidden;
|
||||
|
|
|
@ -281,7 +281,6 @@
|
|||
height:100%;
|
||||
}
|
||||
.files-md{
|
||||
border:1px solid #eee;
|
||||
padding:20px;
|
||||
}
|
||||
/* 详情-代码 */
|
||||
|
|
Loading…
Reference in New Issue