jcberquist / commandbox-cfformat

A CommandBox module for formatting CFML component files.
MIT License
22 stars 10 forks source link

return statement gets pulled to first column #83

Closed TheRealAgentK closed 4 years ago

TheRealAgentK commented 4 years ago
    package boolean function fghfgh(
        required numeric fgfg,
        required numeric fgfg
    ) {
        var fgfg = "";
    <!--- cfformat-ignore-start --->
    <cfquery name="fgfg" datasource="#dsn#">
    INSERT INTO fgfgfg 
        (fgfg, fgfg, fgfg)
    VALUES 
    (<cfqueryparam value="#arguments.fgfg#" cfsqltype="cf_sql_integer">, <cfqueryparam value="#arguments.fgfg#" cfsqltype="cf_sql_integer">, 1)
</cfquery>
    <!--- cfformat-ignore-end --->
    ```
    return true;
}


On 0.15.6, cfformat complains and wants to move the return statement to the left into the first column (essentially remove all indent) of that line.
TheRealAgentK commented 4 years ago

Having an empty line between the closing tag island and the return true; makes the complaint go away.

jcberquist commented 4 years ago

This should be fixed in v0.15.8

TheRealAgentK commented 4 years ago

Yup, confirmed, thx!