diff options
author | Hester Gong <hestergong@gmail.com> | 2023-03-28 13:18:01 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-28 01:18:01 -0400 |
commit | f401337f64702c849b1592f54f39b118e73eeb00 (patch) | |
tree | 7d94fc8c4d48eed701c46c1672a90cb0e18987c2 /templates/package | |
parent | 8df1b4bd699897264c60da7ce982b09cee57f345 (diff) | |
download | gitea-f401337f64702c849b1592f54f39b118e73eeb00.tar.gz gitea-f401337f64702c849b1592f54f39b118e73eeb00.zip |
fix br display for packages curls (#23737)
Before:
<img width="1403" alt="截屏2023-03-27 15 48 23"
src="https://user-images.githubusercontent.com/17645053/227875392-399debf7-db75-4d9a-9436-409f75447c65.png">
This happens because the `<br>` matches this
[rule](https://github.com/go-gitea/gitea/blob/e6e602fd8d35471f1e2f4a42669a1f17e76e0176/web_src/css/markup/content.css#L428),
which is not necessary here (This is introduced by #22861, did a quick
check, and this is the only place used `<br>` inside `<code>` from the
PR):
```css
.markup code br,
.markup tt br {
display: none;
}
```
After:
<img width="1398" alt="截屏2023-03-27 15 46 50"
src="https://user-images.githubusercontent.com/17645053/227875244-b7fba432-b32c-42f7-9517-4e05bb2e64ea.png">
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'templates/package')
-rw-r--r-- | templates/package/content/generic.tmpl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/templates/package/content/generic.tmpl b/templates/package/content/generic.tmpl index eae4d670f9..2674a155d3 100644 --- a/templates/package/content/generic.tmpl +++ b/templates/package/content/generic.tmpl @@ -5,9 +5,9 @@ <div class="field"> <label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.generic.download"}}</label> <div class="markup"><pre class="code-block"><code> - {{- range .PackageDescriptor.Files -}} -curl <gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{$.PackageDescriptor.Owner.Name}}/generic/{{$.PackageDescriptor.Package.Name}}/{{$.PackageDescriptor.Version.Version}}/{{.File.Name}}"></gitea-origin-url><br> - {{- end -}} +{{- range .PackageDescriptor.Files -}} +curl <gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{$.PackageDescriptor.Owner.Name}}/generic/{{$.PackageDescriptor.Package.Name}}/{{$.PackageDescriptor.Version.Version}}/{{.File.Name}}"></gitea-origin-url> +{{end -}} </code></pre></div> </div> <div class="field"> |