Sha256: 25b13f0630e1f6d907a33e0606be624d0e70cb40698703d4cf5a65cdda6a5663

Contents?: true

Size: 907 Bytes

Versions: 3

Compression:

Stored size: 907 Bytes

Contents

Adds CDATA only when necessary.
NOTE: CDATA is output because we use XHTML - for HTML mode it should be omitted.
*** Parameters: ***
{}
*** Markdown input: ***
<script>
  var x = true && true;
</script>

<script>
  var x = true;
</script>

<script>foo && bar</script>

<script>alert('foo');</script>

<style type="text/css">
  p > .highlight {
    color: red;
    background-image: url('/foo?bar&baz');
  }
</style>

<style type="text/css">
  .highlight {
    color: red;
  }
</style>
*** Output of inspect ***

*** Output of to_html ***
<script>//<![CDATA[
  var x = true && true;
//]]></script><script>
  var x = true;
</script><script>//<![CDATA[
foo && bar
//]]></script><script>alert('foo');</script><style type='text/css'>/*<![CDATA[*/
  p > .highlight {
    color: red;
    background-image: url('/foo?bar&baz');
  }
/*]]>*/</style><style type='text/css'>
  .highlight {
    color: red;
  }
</style>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
maruku-0.7.3 spec/block_docs/auto_cdata.md
maruku-0.7.2 spec/block_docs/auto_cdata.md
maruku-0.7.1 spec/block_docs/auto_cdata.md