mirror of
https://github.com/go-gitea/gitea.git
synced 2025-06-21 21:48:00 +02: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
@ -60,6 +60,7 @@
|
||||
{{if .RequireDropzone}}
|
||||
<script src="{{AppSubUrl}}/plugins/dropzone-4.2.0/dropzone.js"></script>
|
||||
{{end}}
|
||||
<script src="{{AppSubUrl}}/js/libs/autolink.js"></script>
|
||||
<script src="{{AppSubUrl}}/js/libs/emojify-1.1.0.min.js"></script>
|
||||
<script src="{{AppSubUrl}}/js/libs/clipboard-1.5.9.min.js"></script>
|
||||
</body>
|
||||
|
@ -4,9 +4,11 @@
|
||||
<div class="ui container">
|
||||
<div class="ui header">
|
||||
{{.i18n.Tr "repo.wiki.pages"}}
|
||||
{{if and .IsRepositoryWriter (not .IsRepositoryMirror)}}
|
||||
<div class="ui right">
|
||||
<a class="ui green small button" href="{{.RepoLink}}/wiki/_new">{{.i18n.Tr "repo.wiki.new_page_button"}}</a>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
<table class="ui table">
|
||||
<tbody>
|
||||
|
@ -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