syntax.us Let the syntax do the talking
Blog Contact Posts Questions Tags Hire Me

Question:
Lua has heredoc?
Tags: lua heredoc

The idea of heredoc is useful for dealing with some large strings.

The Lua syntax below reminds me of heredoc:
mylua_heredoc = [[
%html
  %head
    %title This is HAML
  %body
    %h1 I like HAML.
    HAML is described here:
    %br/
    %a(href="http://haml.info/docs.html")
      http://haml.info/docs.html 
]]

print(mylua_heredoc)
http://en.wikipedia.org/wiki/Here_document


syntax.us Let the syntax do the talking
Blog Contact Posts Questions Tags Hire Me