Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
tufanbarisyildirim opened this issue Oct 18, 2023 · 0 comments
Open

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

tufanbarisyildirim opened this issue Oct 18, 2023 · 0 comments
Assignees
Labels
v2 issues that would be fixed in v2 only

Comments

@tufanbarisyildirim
Copy link
Owner

          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)

@tufanbarisyildirim tufanbarisyildirim self-assigned this Dec 23, 2023
@tufanbarisyildirim tufanbarisyildirim added the v2 issues that would be fixed in v2 only label Dec 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v2 issues that would be fixed in v2 only
Projects
None yet
Development

No branches or pull requests

1 participant