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
This commit is contained in:
hexeth 2019-01-04 12:49:01 -08:00 committed by Ozzie Isaacs
parent ece11de942
commit 29c9d55498

View File

@ -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")' )