diff options
author | Norwin <noerw@users.noreply.github.com> | 2019-08-15 22:09:50 +0000 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2019-08-16 01:09:50 +0300 |
commit | 867f46f78e5777d7bafe83cda3244c1001ce3e60 (patch) | |
tree | a326328927994bd715fae6a43795624355101412 /templates | |
parent | 0a86d25e6a1e054ef0ca0a102dd0f2a68dd75f26 (diff) | |
download | gitea-867f46f78e5777d7bafe83cda3244c1001ce3e60.tar.gz gitea-867f46f78e5777d7bafe83cda3244c1001ce3e60.zip |
Detect delimiter in CSV rendering (#7869)
* detect csv delimiter in csv rendering
fixes #7868
* make linter happy
* fix failing testcase & use ints where possible
* expose markup type to template
previously all markup had the .markdown class, which is incorrect,
as it applies markdown CSS & JS logic to CSV rendering
* fix build (missing `make css`)
* ignore quoted csv content for delimiter scoring
also fix html generation
Diffstat (limited to 'templates')
-rw-r--r-- | templates/repo/view_file.tmpl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/repo/view_file.tmpl b/templates/repo/view_file.tmpl index 72b1ae7a84..895a72aaee 100644 --- a/templates/repo/view_file.tmpl +++ b/templates/repo/view_file.tmpl @@ -45,7 +45,7 @@ </div> </h4> <div class="ui attached table unstackable segment"> - <div class="file-view {{if .IsMarkup}}markdown{{else if .IsRenderedHTML}}plain-text{{else if .IsTextFile}}code-view{{end}} has-emoji"> + <div class="file-view {{if .IsMarkup}}{{.MarkupType}}{{else if .IsRenderedHTML}}plain-text{{else if .IsTextFile}}code-view{{end}} has-emoji"> {{if .IsMarkup}} {{if .FileContent}}{{.FileContent | Safe}}{{end}} {{else if .IsRenderedHTML}} |