You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
app/models/ppt_html.rb:15:5: C: Avoid using rescue in its modifier form.
Regexp.new(/\A<p>(.*)<\/p>\Z/m).match(full_document)[1] rescue full_document
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Output from HTML formatter
<divclass="report"><divclass="meta"><spanclass="location">Line #15</span>
–
<spanclass="severity convention">convention:</span><spanclass="message">Avoid using <code>rescue</code> in its modifier form.</span></div><pre><code> full_document = <spanclass="highlight convention">Regexp.new(/\A</span></code><p><code>
(.*)<\/p>\Z/m).match(full_document)[1] rescue full_document
</code></p></pre></div>
Output from HTML formatter is rendered as two separate lines of code split by <p> tag in regexp literal.
The text was updated successfully, but these errors were encountered:
Initial line of source file:
Output from standard formatter:
Output from HTML formatter
Output from HTML formatter is rendered as two separate lines of code split by
<p>
tag in regexp literal.The text was updated successfully, but these errors were encountered: