Skip to content

Dumper does not preserve the formatting in Lua blocks. #26

@tufanbarisyildirim

Description

@tufanbarisyildirim
          if i have a block like this:
         set_by_lua_block $file_name {
                local t = ngx.var.uri
                local query = string.find(t, "?", 1)
                if query ~= nil then
                   t = string.sub(t, 1, query-1)
                end
                return t;
            }

then the code gonginx.DumpBlock(conf.Block, gonginx.IndentStyle) will dump this result:

   set_by_lua_block {


                            local t = ngx.var.uri local query = string.find(t, "?" , 1) if query ~= nil then t = string.sub(t, 1, query-1) end return t;


            }

it's worse when dump it several times @tufanbarisyildirim

Originally posted by @FeiYing9 in #20 (comment)

Metadata

Metadata

Labels

v2issues that would be fixed in v2 only

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions