-# [html.md](http://neocotic.com/html.md)  
-# (c) 2013 Alasdair Mercer  
-# Freely distributable under the MIT license.  
-# Based on [Make.text](http://homepage.mac.com/tjim/) 1.5  
-# (c) 2007 Trevor Jim  
-# For all details and documentation:  
+# [html.md](http://neocotic.com/html.md)
+# (c) 2013 Alasdair Mercer
+# Freely distributable under the MIT license.
+# Based on [Make.text](http://homepage.mac.com/tjim/) 1.5
+# (c) 2007 Trevor Jim
+# For all details and documentation:
 # <http://neocotic.com/html.md>
 
 # Private constants

# HTML Parser
# -----------

# Parses HTML code and/or elements into valid Markdown.  
# Elements are parsed recursively, meaning their children are also parsed.
class HtmlParser


  str = padStr + str for i in [0...times]
  str

# Remove whitespace from both ends of `str`.
# This tries to use the native `String.prototype.trim` function where possible.
trim = (str = '') ->
  if str.trim then str.trim() else str.replace /^\s+|\s+$/g, ''
