Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix br display for packages curls #23737

Merged
merged 5 commits into from
Mar 28, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion templates/package/content/generic.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.generic.download"}}</label>
<div class="markup"><pre class="code-block"><code>
{{- range .PackageDescriptor.Files -}}
HesterG marked this conversation as resolved.
Show resolved Hide resolved
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>
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 class="gt-di">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't look good to me ....

I would say that the <br> was polluted somewhere else.

Couldn't the pollution be fixed properly?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@silverwind

.markup code br,
.markup tt br {
  display: none;
}

Why do we need these styles?

Copy link
Contributor Author

@HesterG HesterG Mar 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't look good to me ....

I would say that the <br> was polluted somewhere else.

Couldn't the pollution be fixed properly?

Added a commit to get rid of the <br> here as mentioned in the comment below

Copy link
Member

@silverwind silverwind Mar 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need these styles?

These do come from GitHub's CSS.

IDK their significance but I assume inside <code> and such, one breaks via \n usually because of white-space: pre formatting, not <br>.

{{- end -}}
</code></pre></div>
</div>
Expand Down