projects
/
reveal.js.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7d19b4f
)
added custom charset support for external markdown file
author
Emile 'iMil' Heitor
<imil@NetBSD.org>
Tue, 23 Jul 2013 15:31:30 +0000
(17:31 +0200)
committer
Emile 'iMil' Heitor
<imil@NetBSD.org>
Tue, 23 Jul 2013 15:31:30 +0000
(17:31 +0200)
plugin/markdown/markdown.js
patch
|
blob
|
history
diff --git
a/plugin/markdown/markdown.js
b/plugin/markdown/markdown.js
index 473666b87d2bb1b94b87119851a115ba2c659c1c..9681cf1dbd37ae47c86fca985ef0a0f58a137895 100755
(executable)
--- a/
plugin/markdown/markdown.js
+++ b/
plugin/markdown/markdown.js
@@
-128,6
+128,12
@@
var xhr = new XMLHttpRequest(),
url = section.getAttribute('data-markdown');
+ datacharset = section.getAttribute('data-charset');
+ // see https://developer.mozilla.org/en-US/docs/Web/API/element.getAttribute#Notes
+ if (datacharset != null && datacharset != '') {
+ xhr.overrideMimeType('text/html; charset=' + datacharset);
+ }
+
xhr.onreadystatechange = function () {
if( xhr.readyState === 4 ) {
if (xhr.status >= 200 && xhr.status < 300) {