File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -272,7 +272,7 @@ export class UtilsService {
272
272
if ( type === 'figure' ) {
273
273
prefix = 'Figure ' + veNumber + '. ' ;
274
274
const capFig = el . find ( 'figure > figcaption' ) ;
275
- name = capFig . text ( ) ;
275
+ name = capFig . text ( ) . trim ( ) ;
276
276
if ( name !== '' && name . indexOf ( 'Figure' ) === 0 && name . split ( '. ' ) . length > 0 ) {
277
277
name = name . substring ( name . indexOf ( prefix ) + prefix . length ) ;
278
278
} else if ( name === '' ) {
@@ -402,8 +402,8 @@ export class UtilsService {
402
402
* @returns {void } nothing
403
403
*/
404
404
public convertViewLinks ( printElement : JQuery < HTMLElement > ) : void {
405
- printElement . find ( 'mms-view-link' ) . each ( ( index ) => {
406
- const $this = $ ( this ) ;
405
+ printElement . find ( 'mms-view-link' ) . each ( ( index , el ) => {
406
+ const $this = $ ( el ) ;
407
407
let elementId = $this . attr ( 'mms-element-id' ) || $this . attr ( 'data-mms-element-id' ) ;
408
408
if ( ! elementId ) {
409
409
return ;
You can’t perform that action at this time.
0 commit comments