<p dir="auto">Pass the text of reports ('details' field) through the RichText formatter to give us kramdown formatting support.</p>
<p dir="auto">Users don't generally get to see their reports. Only a few admins ever see them displayed, but DWG folks working with reports have complained of a <strong>"wall of text"</strong> problem when looking at some longer reports. This solves it with basic paragraphs rendered from double-newlines. Other kramdown tricks area a bonus:</p>
<p><a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/227525/165867251-d671ad4b-3910-4149-8c9b-8dc13970d433.png"><img width="900" alt="before-after" src="https://user-images.githubusercontent.com/227525/165867251-d671ad4b-3910-4149-8c9b-8dc13970d433.png" style="max-width: 100%;"></a></p>
<p dir="auto">We don't need to do support of alternative HTML formatting as we did for legacy diary entries. I don't think we need any special treatment for old reports in the database. We can bung them all through the kramdown formatter and it will either make no difference or will improve the display.</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/openstreetmap/openstreetmap-website/pull/3539'>https://github.com/openstreetmap/openstreetmap-website/pull/3539</a></p>

<h4>Commit Summary</h4>
<ul>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/3539/commits/05afb2ce9dc32b0d1bf0d73881fd41c168ecdd8a" class="commit-link">05afb2c</a>  Add test of individual issue view with report</li>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/3539/commits/75fcb052ad89c3f25fd2b2c76eabcbdc738dfbda" class="commit-link">75fcb05</a>  Format report text with kramdown</li>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/3539/commits/5c66d2b04dccac1ccd8bb186b78c962b7c88eac9" class="commit-link">5c66d2b</a>  Add kramdown info box with preview button</li>
</ul>

<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/openstreetmap/openstreetmap-website/pull/3539/files">5 files</a>)</p>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/3539/files#diff-d276df626ef0e97e1f84661e93ed03fec2c8d90297f99c2dc2a85eb5a2337b6a">app/models/report.rb</a>
    (4)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/3539/files#diff-9f4364ccf8191e24c7f76afe07a3d75250521b70be8e825706f0328b710fd73f">app/views/issues/_reports.html.erb</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/3539/files#diff-33589878a9529b8fd50734f1b8a284a7b100af100d95e2947f20a7dc45da50c5">app/views/reports/new.html.erb</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/3539/files#diff-8a327ede5b93ff905ead5dc6d960dc90bad6ffefd0dd7cd768921f950f952ac7">test/models/report_test.rb</a>
    (5)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/3539/files#diff-1937855845d794c2ab6ec4812a8b4e3230c470b69ff763285bdd810915042839">test/system/issues_test.rb</a>
    (11)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/3539.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/3539.patch</a></li>
  <li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/3539.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/3539.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/3539">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLLBTFMQZDIIQ4662LLVHMT2JANCNFSM5UUFBHHQ">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLJXBFCHERIXUKXXQWTVHMT2JA5CNFSM5UUFBHH2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4SFP7YJA.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/pull/3539</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/3539",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/3539",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>