Przeglądaj źródła

Fixed bug in docs regular expression.

This was creating mess when URL contained "html" also elsewhere than just at the end.
alteredq 13 lat temu
rodzic
commit
a650f50aa9
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      docs/page.js

+ 1 - 1
docs/page.js

@@ -1,6 +1,6 @@
 var onDocumentLoad = function ( event ) {
 var onDocumentLoad = function ( event ) {
 
 
-	var name = /[A-z0-9]+.html/.exec( window.location.pathname ).toString().split( '.html' )[ 0 ];
+	var name = /[A-z0-9]+\.html/.exec( window.location.pathname ).toString().split( '.html' )[ 0 ];
 	var path = /\/api\/[A-z0-9\/]+/.exec( window.location.pathname ).toString().substr( 5 );
 	var path = /\/api\/[A-z0-9\/]+/.exec( window.location.pathname ).toString().substr( 5 );
 
 
 	var text = document.body.innerHTML;
 	var text = document.body.innerHTML;