From 9472eec69b989a86d06c544bef4effb78eaa9a7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emanuel=20Sch=C3=BCtze?= Date: Fri, 24 Mar 2017 09:35:13 +0100 Subject: [PATCH] Cleanup pdf parsing code for indentation fix in diff mode. --- openslides/core/static/js/core/pdf.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openslides/core/static/js/core/pdf.js b/openslides/core/static/js/core/pdf.js index d58a7ff80..487842f66 100644 --- a/openslides/core/static/js/core/pdf.js +++ b/openslides/core/static/js/core/pdf.js @@ -694,8 +694,9 @@ angular.module('OpenSlidesApp.core.pdf', []) pObjectToPush = stackP; //usually we want to push stackP if (lineNumberMode === "outside") { if (element.childNodes.length > 0) { //if we hit = 0, the code would fail - var pChildTagName = element.childNodes[0].tagName; - if (pChildTagName === "INS" || pChildTagName === undefined) { //the desired case + // add empty line number column for inline diff or pragraph diff mode + if (element.childNodes[0].tagName === "INS" || + element.getAttribute("class") === "insert") { var pLineNumberPlaceholder = { width: 20, text: "",