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:
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…
Reference in New Issue
Block a user