       # ng-if
       # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
-      .replace(/<[^>]*?\sng-if="(.*?)"[\s\S]*?>([\S\s]+)/g, (match, varName, post) ->
+      .replace(/<[^>]*?\s(ng|bo)-if="(.*?)"[\s\S]*?>([\S\s]+)/g, (match, varName, post) ->
         helpers.logVerbose 'match 2'
         updated = true
+
         if _.contains match.replace(post, ''), 'compylr-keep'
           return match.replace 'ng-if', 'ng-cloak data-ng-if'
 

        escapeDoubleBraces """#{openTag}{{translate '#{ cleanedContents.trim() }' '#{cleanedValues}'}}#{closeTag}"""


      # ng-show, ng-hide
      # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

      .replace(/\s(ng-show|ng-hide)\s*=\s*"([^"]+)"/g, (match, showOrHide, expression) ->
        helpers.logVerbose 'match 6'

        updated = true
        hbsTagType = if showOrHide is 'ng-show' then 'hbsShow' else 'hbsHide'
        match = match.replace ' ' + showOrHide, " data-#{showOrHide}"
        "#{match} {{#{hbsTagType} \"#{expression}\"}}"
      )

      # ng-bind, ng-bind-html
      # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

      .replace /<[^>]*\s(ng-bind|ng-bind-html)\s*=\s*"([^"]+)"[^>]*>[^<]*(<.*?>)/g, (match, type, expression, closeTag) ->
        helpers.logVerbose 'match 7'
        updated = true
        str = match.replace type, "data-#{type}"
        expressionTag = if type is 'ng-bind' then escapeDoubleBraces "{{#{expression}}}" else escapeTripleBraces "{{{#{expression}}}}"
        str = str.replace closeTag, expressionTag + closeTag

      # bo-text
      # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

      .replace /<[^>]*\s(bo-text)\s*=\s*"([^"]+)"[^>]*>[^<]*(<.*?>)/g, (match, type, expression, closeTag) ->
        helpers.logVerbose 'match 7'
        updated = true
        str = match.replace type, type
        expressionTag = escapeDoubleBraces "{{#{expression}}}"
        str = str.replace closeTag, expressionTag + closeTag



          escapeDoubleBraces match
      )


  # Unescape and output
  # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  try
    interpolated = unescapeTripleBraces interpolated
    interpolated = unescapeReplacements interpolated
    interpolated = unescapeBasicAttributes interpolated
    # interpolated = convertNgToDataNg interpolated
    interpolated = convertDataNgToNg interpolated
    interpolated = unescapeDoubleBraces unescapeDoubleBraces interpolated
    beautified = beautify interpolated

    if argv.file and not argv['no-write']
      fs.writeFileSync 'template-output/output.html', beautified

    beautified
  catch e
    console.log e

compile.setHelpers = (handlebars) ->
  require('./handlebars-helpers') handlebars
