From 441a26cf9060b934a26c362ecbb0f6e3fa6701ea Mon Sep 17 00:00:00 2001
From: Benjamin Tan <demoneaux@gmail.com>
Date: Sun, 11 Dec 2016 18:14:02 +0800
Subject: [PATCH] Allow background images without protocols to have query
 hashes/parameters.

Closes #1603.
---
 js/reveal.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/js/reveal.js b/js/reveal.js
index 28aa400..695b26b 100644
--- a/js/reveal.js
+++ b/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 {