Commit 29c9d554 authored by hexeth's avatar hexeth Committed by Ozzie Isaacs

Remove leading space in span (#749)

Previous code was not targeting right element, additionally was only removing a single leading space. New regex will remove any leading spaces from span
parent ece11de9
...@@ -220,8 +220,8 @@ publisher = $( '.publishers p span' ).text().split( ':' ); ...@@ -220,8 +220,8 @@ publisher = $( '.publishers p span' ).text().split( ':' );
$.each(publisher, function(i, val) { $.each(publisher, function(i, val) {
$( '.publishers' ).append( '<span>' + publisher[i] + '</span>' ); $( '.publishers' ).append( '<span>' + publisher[i] + '</span>' );
}); });
$( '.publishers span:nth-child(2)' ).text(function() { $( '.publishers span:nth-child(3)' ).text(function() {
return $(this).text().replace(/^\s+/g, ""); return $(this).text().replace(/^\s+|^\t+|\t+|\s+$/g, "");
}); });
published = $( '.book-meta p:contains("Publishing date")' ) published = $( '.book-meta p:contains("Publishing date")' )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment