Skip to content

Commit

Permalink
update syntax highlight after editing (#210), move markdown and highl…
Browse files Browse the repository at this point in the history
…ight scripts from lib to plugin
  • Loading branch information
hakimel committed Oct 28, 2012
1 parent 9da9726 commit e693717
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
7 changes: 4 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -356,14 +356,15 @@ <h3>BY Hakim El Hattab / hakim.se</h3>

// Optional libraries used to extend on reveal.js
dependencies: [
{ src: 'lib/js/highlight.js', async: true, callback: function() { window.hljs.initHighlightingOnLoad(); } },
{ src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } },
{ src: 'lib/js/showdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'lib/js/data-markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'plugin/markdown/showdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
{ src: 'plugin/zoom-js/zoom.js', async: true, condition: function() { return !!document.body.classList; } },
{ src: 'plugin/notes/notes.js', async: true, condition: function() { return !!document.body.classList; } }
]
});

</script>

</body>
Expand Down
9 changes: 9 additions & 0 deletions lib/js/highlight.js → plugin/highlight/highlight.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions lib/js/data-markdown.js → plugin/markdown/markdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
// Modified by Hakim to handle Markdown indented with tabs
(function(){

if( typeof Showdown === 'undefined' ) {
throw 'The reveal.js Markdown plugin requires Showdown to be loaded';
}

var sections = document.querySelectorAll( '[data-markdown]' );

for( var i = 0, len = sections.length; i < len; i++ ) {
Expand Down
File renamed without changes.

0 comments on commit e693717

Please sign in to comment.