mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Markdown rendering overhaul (#186)
* Markdown rendering overhaul Cleaned up and squashed commits into single one. Signed-off-by: Andrew Boyarshin <boyarshinand@gmail.com> * Fix markdown API, add markdown module and API tests, improve code coverage Signed-off-by: Andrew Boyarshin <boyarshinand@gmail.com>
This commit is contained in:
committed by
Lunny Xiao
parent
5cc275b1de
commit
dc8248f8a4
@@ -50,7 +50,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui dividing header">
|
||||
<div class="ui header">
|
||||
{{.title}}
|
||||
{{if and .IsRepositoryWriter (not .Repository.IsMirror)}}
|
||||
<div class="ui right">
|
||||
@@ -64,9 +64,28 @@
|
||||
{{.i18n.Tr "repo.wiki.last_commit_info" .Author.Name $timeSince | Safe}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui segment markdown">
|
||||
{{.content | Str2html}}
|
||||
{{if .FormatWarning}}
|
||||
<div class="ui negative message">
|
||||
<p>{{.FormatWarning}}</p>
|
||||
</div>
|
||||
{{end}}
|
||||
<div class="ui {{if .sidebarPresent}}grid equal width{{end}}" style="margin-top: 1rem;">
|
||||
<div class="ui {{if .sidebarPresent}}eleven wide column{{end}} segment markdown">
|
||||
{{.content | Str2html}}
|
||||
</div>
|
||||
{{if .sidebarPresent}}
|
||||
<div class="column" style="padding-top: 0;">
|
||||
<div class="ui segment">
|
||||
{{.sidebarContent | Str2html}}
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
{{if .footerPresent}}
|
||||
<div class="ui grey segment">
|
||||
{{.footerContent | Str2html}}
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
Reference in New Issue
Block a user