-
Notifications
You must be signed in to change notification settings - Fork 543
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
AO3-4842 Add <br /> between paragraphs for Support and PAC tickets #3383
Conversation
lib/html_cleaner.rb
Outdated
@@ -398,4 +398,8 @@ def strip_html_breaks_simple(value) | |||
strip | |||
end | |||
|
|||
def double_html_paragraphs(value) | |||
return "" if value.blank? | |||
value.gsub(/\s*<\/p>\s*<p>s*/, "</p><p> </p><p>") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/RegexpLiteral: Use %r around regular expression.
@@ -20,6 +20,10 @@ def title | |||
strip_html_breaks_simple(@title) | |||
end | |||
|
|||
def description |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/DuplicateMethods: Method FeedbackReporter#description is defined at both app/models/feedback_reporters/feedback_reporter.rb:5 and app/models/feedback_reporters/feedback_reporter.rb:23.
Looks good! 👍 Thank you for doing this! |
Issue
https://otwarchive.atlassian.net/browse/AO3-4842
Purpose
Adds a
<br />
between the paragraphs in Support and PAC tickets because the ticket tracker's paragraph styling doesn't have margins, so the paragraphs looked more like:Paragraph 1
Paragraph 2
than like
Paragraph 1
Paragraph 2
even though they were correctly HTMLified as
<p>Paragraph 1</p><p>Paragraph 2</p>
They are now rather horrifically done as
<p>Paragraph 1</p><br /><p>Paragraph 2</p>
because a single empty<p></p>
did not have sufficient line height to resemble a blank line, and
or 
caused the tickets not to make it to the tracker, while an actual typed out space would get stripped and go right back to the line height not resembling a blank line.Testing
Refer to Jira