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
pull/751/head
hexeth 6 years ago committed by Ozzie Isaacs
parent ece11de942
commit 29c9d55498

@ -220,8 +220,8 @@ publisher = $( '.publishers p span' ).text().split( ':' );
$.each(publisher, function(i, val) {
$( '.publishers' ).append( '<span>' + publisher[i] + '</span>' );
});
$( '.publishers span:nth-child(2)' ).text(function() {
return $(this).text().replace(/^\s+/g, "");
$( '.publishers span:nth-child(3)' ).text(function() {
return $(this).text().replace(/^\s+|^\t+|\t+|\s+$/g, "");
});
published = $( '.book-meta p:contains("Publishing date")' )

Loading…
Cancel
Save