Hacker News new | past | comments | ask | show | jobs | submit login

the [[ and ]] are used for literal/multiline strings, so they make sense in block quotes. and you don't have to end the block with --]]. ]] is fine, which is the only thing i've ever used since it would never have occurred to me, especially as an anemic commenter, to use that quoting trick

the [[ and ]] can be extended to nest strings/comments like so:

  --[==[
  function add( a, b )
      --[[
      return a + b
      ]]
      return a - b
  end
  ]==]
you can use [=[ ]=], [====[ ]====] etc



With the number of equals matching on the opening and closing comments.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: