<p dir="auto">Code folding seems to break if comments are placed at the very beginning of an indented line, such as:</p>
<div class="highlight highlight-source-ruby notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="def customized_tools
    require 'uglifier'

    @page_module = &quot;application&quot;
    @page_submodule = &quot;tools&quot;

    @qp_id = current_user.token
    @qp_id = 'ERROR' if !@qp_id

#    qp = ActionController::Base.helpers.asset_path &quot;qp.js&quot;
    qp = &quot;assets/qp.js&quot;
#    Rails.logger.debug &quot;Asset: #{qp}&quot;
    bm = File.read(&quot;#{Rails.root}/support/bm.js&quot;)"><pre class="notranslate"><span class="pl-k">def</span> <span class="pl-en">customized_tools</span>
    <span class="pl-en">require</span> <span class="pl-s">'uglifier'</span>

    <span class="pl-c1">@page_module</span> <span class="pl-c1">=</span> <span class="pl-s">"application"</span>
    <span class="pl-c1">@page_submodule</span> <span class="pl-c1">=</span> <span class="pl-s">"tools"</span>

    <span class="pl-c1">@qp_id</span> <span class="pl-c1">=</span> <span class="pl-en">current_user</span><span class="pl-kos">.</span><span class="pl-en">token</span>
    <span class="pl-c1">@qp_id</span> <span class="pl-c1">=</span> <span class="pl-s">'ERROR'</span> <span class="pl-k">if</span> !<span class="pl-c1">@qp_id</span>

<span class="pl-c">#    qp = ActionController::Base.helpers.asset_path "qp.js"</span>
    <span class="pl-s1">qp</span> <span class="pl-c1">=</span> <span class="pl-s">"assets/qp.js"</span>
<span class="pl-c">#    Rails.logger.debug "Asset: #{qp}"</span>
    <span class="pl-s1">bm</span> <span class="pl-c1">=</span> <span class="pl-v">File</span><span class="pl-kos">.</span><span class="pl-en">read</span><span class="pl-kos">(</span><span class="pl-s">"<span class="pl-s1"><span class="pl-kos">#{</span><span class="pl-v">Rails</span><span class="pl-kos">.</span><span class="pl-en">root</span><span class="pl-kos">}</span></span>/support/bm.js"</span><span class="pl-kos">)</span></pre></div>
<p dir="auto">Whereas changing the comment start location seems to fix it:</p>
<div class="highlight highlight-source-ruby notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="def customized_tools
    require 'uglifier'

    @page_module = &quot;application&quot;
    @page_submodule = &quot;tools&quot;

    @qp_id = current_user.token
    @qp_id = 'ERROR' if !@qp_id

    # qp = ActionController::Base.helpers.asset_path &quot;qp.js&quot;
    qp = &quot;assets/qp.js&quot;
    # Rails.logger.debug &quot;Asset: #{qp}&quot;
    bm = File.read(&quot;#{Rails.root}/support/bm.js&quot;)"><pre class="notranslate"><span class="pl-k">def</span> <span class="pl-en">customized_tools</span>
    <span class="pl-en">require</span> <span class="pl-s">'uglifier'</span>

    <span class="pl-c1">@page_module</span> <span class="pl-c1">=</span> <span class="pl-s">"application"</span>
    <span class="pl-c1">@page_submodule</span> <span class="pl-c1">=</span> <span class="pl-s">"tools"</span>

    <span class="pl-c1">@qp_id</span> <span class="pl-c1">=</span> <span class="pl-en">current_user</span><span class="pl-kos">.</span><span class="pl-en">token</span>
    <span class="pl-c1">@qp_id</span> <span class="pl-c1">=</span> <span class="pl-s">'ERROR'</span> <span class="pl-k">if</span> !<span class="pl-c1">@qp_id</span>

    <span class="pl-c"># qp = ActionController::Base.helpers.asset_path "qp.js"</span>
    <span class="pl-s1">qp</span> <span class="pl-c1">=</span> <span class="pl-s">"assets/qp.js"</span>
    <span class="pl-c"># Rails.logger.debug "Asset: #{qp}"</span>
    <span class="pl-s1">bm</span> <span class="pl-c1">=</span> <span class="pl-v">File</span><span class="pl-kos">.</span><span class="pl-en">read</span><span class="pl-kos">(</span><span class="pl-s">"<span class="pl-s1"><span class="pl-kos">#{</span><span class="pl-v">Rails</span><span class="pl-kos">.</span><span class="pl-en">root</span><span class="pl-kos">}</span></span>/support/bm.js"</span><span class="pl-kos">)</span></pre></div>
<p dir="auto">Using the following PHP file:</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;?php

class Test {
    public function test() {
//      breaks folding
    }
}"><pre class="notranslate"><span class="pl-ent">&lt;?php</span>

<span class="pl-k">class</span> <span class="pl-v">Test</span> {
    <span class="pl-k">public</span> <span class="pl-k">function</span> <span class="pl-en">test</span>() {
<span class="pl-c">//      breaks folding</span>
    }
}</pre></div>
<p dir="auto">Attempting to fold the class results in a fold up to the comment.<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1759837/4135590/8018824a-3377-11e4-85a9-59d2a9b5e22d.png"><img src="https://cloud.githubusercontent.com/assets/1759837/4135590/8018824a-3377-11e4-85a9-59d2a9b5e22d.png" alt="screen shot 2014-09-03 at 15 34 54" style="max-width: 100%;"></a></p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1759837/4135634/f2612a96-3377-11e4-935e-6ee3f8b486c5.png"><img src="https://cloud.githubusercontent.com/assets/1759837/4135634/f2612a96-3377-11e4-935e-6ee3f8b486c5.png" alt="screen shot 2014-09-03 at 15 37 58" style="max-width: 100%;"></a></p>
<p dir="auto">It seems like using any character other than whitespace at the start of the line will cause the fold to break.</p>
<p dir="auto">Atom 0.124.0 in safe mode, btw.</p>