Skip to content

Commit 6af11e4

Browse files
author
Doris Lam
committed
fix view links in pdf
1 parent 1cf7674 commit 6af11e4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ve-utils/application/Utils.service.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ export class UtilsService {
272272
if (type === 'figure') {
273273
prefix = 'Figure ' + veNumber + '. ';
274274
const capFig = el.find('figure > figcaption');
275-
name = capFig.text();
275+
name = capFig.text().trim();
276276
if (name !== '' && name.indexOf('Figure') === 0 && name.split('. ').length > 0) {
277277
name = name.substring(name.indexOf(prefix) + prefix.length);
278278
} else if (name === '') {
@@ -402,8 +402,8 @@ export class UtilsService {
402402
* @returns {void} nothing
403403
*/
404404
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);
407407
let elementId = $this.attr('mms-element-id') || $this.attr('data-mms-element-id');
408408
if (!elementId) {
409409
return;

0 commit comments

Comments
 (0)