bespokejs / bespoke

DIY Presentation Micro-Framework
http://markdalgleish.com/projects/bespoke.js/
MIT License
4.68k stars 443 forks source link

insert html code example #51

Closed QIvan closed 9 years ago

QIvan commented 9 years ago

Hello! I tried to use bespoke for presentation angularjs for my colleagues. But when i try to insert my html code bespoke removes html-tags =( my code:

        pre.language-html 
          code.
            <head> sf</head>

with language-javascript it's the same result.

Sorry for my bad english... Thanks!

QIvan commented 9 years ago

i solved my question. It's option for task "jade" in build file

options: {
          pretty: true,
          filters:{
            escape: function( block ) {
                        return block
                          .replace( /&/g, '&amp;'  )
                          .replace( /</g, '&lt;'   )
                          .replace( />/g, '&gt;'   )
                          .replace( /"/g, '&quot;' )
                          .replace( /#/g, '&#35;'  )
                          .replace( /\\/g, '\\\\'  );
                          //.replace( /\n/g, '\\n'   );
                      }
          }
        }
      }
    },

and for insert to the prezentation

code
    include:escape ./app/index.html