# 【Lua】註解

### 單行註解

```Lua
 --  這是註解
```

### 多行註解

```Lua
-- 使用 --[[ 內文 ]]-- 包起來

--[[
 function log_header_body()
        -- 取出列表編號
        local t = cjson.decode(ngx.req.get_body_data())
        local body =  cjson.encode(t)
        ngx.log(ngx.ERR, body)
        local headers = cjson.encode(ngx.req.get_headers())
        ngx.log(ngx.ERR, headers)
    
end
]]--
```

#### 特數多行註解

可在--\[ ${這中間插入任意數量=}\[ ..... \] ${這中間插入任意數量=}\]--

```Lua
--[===[
Some Comments
==============
特別插入--]]  但實際註釋還未結束
--]===] print("這段不是註釋") -- end comment
```