1.0.1 • Published 9 years ago
htmlp_parse v1.0.1
<script type="text/coffeescript" <span style="color:blue; font-weight: bold;">data-htmlp="x.coffee"</span>>
<span style="color:red; font-weight: bold;">x = 42</span>
</script>
<code <span style="color:blue; font-weight: bold;">data-htmlp="x.coffee"</span>>
<span style="color:red; font-weight: bold;">console.log x is 42</span>
</code>
<code <span style="color:blue; font-weight: bold;">data-htmlp="y.coffee"</span>>
<span style="color:red; font-weight: bold;">y = false</span>
</code>
</body>
</html>
### Case 2 ###
case_2_actual = htmlp_parse '<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><title>My LP File</title></head><body><h1>No file exports here :)</h1></body></html>'
case_2_expected = {}
assert _.isEqual( case_1_actual, case_1_expected ), 'Case 2 failure'
_.each file_writes, (element) ->
if _.isString files[ element.file_name ]
files[ element.file_name ] += '\n' + element.text
else
files[ element.file_name ] = element.text