From 8bffe8dba19a011d9a9f5130c7b3ac48d4152ae6 Mon Sep 17 00:00:00 2001 From: evazion Date: Sun, 13 Oct 2019 18:53:46 -0500 Subject: [PATCH] Fix #4189: long source: link not wrapping on tag changes report, and underscores shown as spaces * Use underscores instead of spaces for tags in inline tag lists (upload tags report, tooltips, modqueue, comments page). * Allow long tags to word wrap. Fixes long sources not wrapping in the uploads tag report. Also fixes very long tags that don't have underscores not wrapping in the sidebar (ex: kuouzumiaiginsusutakeizumonokamimeichoujin_mika). --- app/javascript/src/styles/common/tags.scss.erb | 4 ++++ app/presenters/tag_set_presenter.rb | 2 +- app/views/posts/show.html+tooltip.erb | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/javascript/src/styles/common/tags.scss.erb b/app/javascript/src/styles/common/tags.scss.erb index f87f4f88b..406d3819b 100644 --- a/app/javascript/src/styles/common/tags.scss.erb +++ b/app/javascript/src/styles/common/tags.scss.erb @@ -40,6 +40,10 @@ background-color: red; } +a.search-tag { + word-break: break-word; +} + .inline-tag-list { ul { display: inline; diff --git a/app/presenters/tag_set_presenter.rb b/app/presenters/tag_set_presenter.rb index 716caf259..f40039ffd 100644 --- a/app/presenters/tag_set_presenter.rb +++ b/app/presenters/tag_set_presenter.rb @@ -49,7 +49,7 @@ class TagSetPresenter < Presenter end # compact (horizontal) list, as seen in the /comments index. - def inline_tag_list_html(humanize_tags: true) + def inline_tag_list_html(humanize_tags: false) html = split_tag_list_html(category_list: TagCategory.categorized_list, headers: false, show_extra_links: false, name_only: true, humanize_tags: humanize_tags) %{#{html}}.html_safe end diff --git a/app/views/posts/show.html+tooltip.erb b/app/views/posts/show.html+tooltip.erb index 86c6e62e6..c3c0afc19 100644 --- a/app/views/posts/show.html+tooltip.erb +++ b/app/views/posts/show.html+tooltip.erb @@ -51,6 +51,6 @@ <% end %> - <%= @post.presenter.inline_tag_list_html(humanize_tags: false) %> + <%= @post.presenter.inline_tag_list_html %>