Skip to content

Commit

Permalink
fixed indention
Browse files Browse the repository at this point in the history
  • Loading branch information
dodo committed Nov 5, 2011
1 parent ce40020 commit c0e3ae2
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/template.coffee
Expand Up @@ -129,7 +129,7 @@ class Template extends EventEmitter
for name, method of Builder::
ExtendedBuilder::[name] = method

@xml = new ExtendedBuilder
@xml = new ExtendedBuilder opts
@end = @xml.end
Tag = @xml.Tag
class ExtendedTag
Expand Down
27 changes: 26 additions & 1 deletion src/test/template.coffee
Expand Up @@ -49,7 +49,32 @@ module.exports =
'</html>'
]

'layout': (æ) ->
pretty: (æ) ->
xml = new Template schema:5, pretty:" ", ->
@$html ->
@$head ->
@$title "holla"
@$body ->
@$p "hello world"
xml.on 'end', æ.done
xml.on 'data', (tag) -> æ.equal results.shift(), tag
results = [
'<!DOCTYPE html>'
'<html>'
' <head>'
' <title>'
' holla'
' </title>'
' </head>'
' <body>'
' <p>'
' hello world'
' </p>'
' </body>'
'</html>'
]

layout: (æ) ->

layout = ({title}, callback) ->
new Template schema:'html5', ->
Expand Down

0 comments on commit c0e3ae2

Please sign in to comment.