From 5eef2292e703300142e04907984b35117758ec82 Mon Sep 17 00:00:00 2001 From: Inga Kirschnick Date: Wed, 26 Jul 2023 11:25:32 +0200 Subject: [PATCH] bug fixes --- app/corpora/json_routes.py | 2 +- app/static/js/CorpusAnalysis/QueryBuilder.js | 4 +-- app/templates/jobs/job.html.j2 | 27 +++++++++++--------- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/app/corpora/json_routes.py b/app/corpora/json_routes.py index 5ba4d7a2..6a3b5f29 100644 --- a/app/corpora/json_routes.py +++ b/app/corpora/json_routes.py @@ -66,7 +66,7 @@ def get_stopwords(): stopwords = {} for language in languages: stopwords[language] = nltk.corpus.stopwords.words(language) - stopwords['punctuation'] = list(punctuation) + ['—', '|', '–', '“', '„'] + stopwords['punctuation'] = list(punctuation) + ['—', '|', '–', '“', '„', '--'] stopwords['user_stopwords'] = [] response_data = stopwords return response_data, 202 diff --git a/app/static/js/CorpusAnalysis/QueryBuilder.js b/app/static/js/CorpusAnalysis/QueryBuilder.js index d226d3cc..9163b4bc 100644 --- a/app/static/js/CorpusAnalysis/QueryBuilder.js +++ b/app/static/js/CorpusAnalysis/QueryBuilder.js @@ -289,8 +289,8 @@ class ConcordanceQueryBuilder { this.elements.yourQueryContent = []; for (let element of this.elements.yourQuery.childNodes) { let queryElement = element.dataset.query; - queryElement = Utils.escape(queryElement); - if (queryElement !== 'undefined') { + if (queryElement !== undefined) { + queryElement = Utils.escape(queryElement); this.elements.yourQueryContent.push(queryElement); } } diff --git a/app/templates/jobs/job.html.j2 b/app/templates/jobs/job.html.j2 index 51f2fc6d..45346cf8 100644 --- a/app/templates/jobs/job.html.j2 +++ b/app/templates/jobs/job.html.j2 @@ -152,24 +152,27 @@ {% endblock scripts %}