Explorar el Código

Merge pull request #1768 from demoneaux/background-images

Allow background images without protocols to have query hashes/parameters.
Hakim El Hattab hace 8 años
padre
commit
cb16f27dd3
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      js/reveal.js

+ 1 - 1
js/reveal.js

@@ -859,7 +859,7 @@
 
 		if( data.background ) {
 			// Auto-wrap image urls in url(...)
-			if( /^(http|file|\/\/)/gi.test( data.background ) || /\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test( data.background ) ) {
+			if( /^(http|file|\/\/)/gi.test( data.background ) || /\.(svg|png|jpg|jpeg|gif|bmp)([?#]|$)/gi.test( data.background ) ) {
 				slide.setAttribute( 'data-background-image', data.background );
 			}
 			else {