Merge branch 'master' of https://github.com/iMilnb/reveal.js into dev
This commit is contained in:
		| @@ -16,8 +16,8 @@ | |||||||
|  |  | ||||||
| 			<div class="slides"> | 			<div class="slides"> | ||||||
|  |  | ||||||
|                 <!-- Use external markdown resource, and separate slides by three newlines; vertical slides by two newlines --> |                 <!-- Use external markdown resource, separate slides by three newlines; vertical slides by two newlines and specify a custom charset --> | ||||||
|                 <section data-markdown="example.md" data-separator="^\n\n\n" data-vertical="^\n\n"></section> |                 <section data-markdown="example.md" data-separator="^\n\n\n" data-vertical="^\n\n" data-charset="iso-8859-15"></section> | ||||||
|  |  | ||||||
|                 <!-- Slides are separated by three dashes (quick 'n dirty regular expression) --> |                 <!-- Slides are separated by three dashes (quick 'n dirty regular expression) --> | ||||||
|                 <section data-markdown data-separator="---"> |                 <section data-markdown data-separator="---"> | ||||||
|   | |||||||
| @@ -128,6 +128,12 @@ | |||||||
|                 var xhr = new XMLHttpRequest(), |                 var xhr = new XMLHttpRequest(), | ||||||
|                     url = section.getAttribute('data-markdown'); |                     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 () { |                 xhr.onreadystatechange = function () { | ||||||
|                     if( xhr.readyState === 4 ) { |                     if( xhr.readyState === 4 ) { | ||||||
|                         if (xhr.status >= 200 && xhr.status < 300) { |                         if (xhr.status >= 200 && xhr.status < 300) { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user