From 0064890a5e196a2ab69fc79b8a1572f014778f4b Mon Sep 17 00:00:00 2001 From: Andreas Philippi Date: Mon, 16 Oct 2023 14:09:19 +0200 Subject: [PATCH] Feat: support linebreaks in titles This commit: - Updates the converter version to the most recent version. This version imports line breaks in titles as `
` tags - Displays line breaks in the norm title in the frontend - Displays line breaks as white space in section titles in the table of contents RISDEV-2581 RISDEV-2546 RISDEV-2545 --- backend/build.gradle.kts | 4 +- frontend/src/components/ExpandableDataSet.vue | 2 - frontend/src/components/NormsList.vue | 4 +- .../tableOfContents/TableOfContents.vue | 28 +- frontend/src/helpers/sanitizer.ts | 51 +++ .../routes/norms/norm/[normGuid]/content.vue | 16 +- .../tableOfContents/tableOfContents.spec.ts | 4 +- ...hrough-api-and-retrieve-xml-by-eli.spec.ts | 2 +- .../e2e/norms/testdata/norm_basic_exported.ts | 377 ++++++++++++++++++ frontend/test/helpers/sanitizer.spec.ts | 67 ++++ 10 files changed, 534 insertions(+), 21 deletions(-) create mode 100644 frontend/src/helpers/sanitizer.ts create mode 100644 frontend/test/e2e/norms/testdata/norm_basic_exported.ts create mode 100644 frontend/test/helpers/sanitizer.spec.ts diff --git a/backend/build.gradle.kts b/backend/build.gradle.kts index 70199db1f4..05ff8e48fb 100644 --- a/backend/build.gradle.kts +++ b/backend/build.gradle.kts @@ -217,9 +217,9 @@ dependencies { implementation("com.icegreen:greenmail:2.0.0") - implementation("de.bund.digitalservice:ris-norms-juris-converter:0.19.1") + implementation("de.bund.digitalservice:ris-norms-juris-converter:0.19.2") // for local development: - // implementation(files("ris-norms-juris-converter-0.19.1.jar")) + // implementation(files("ris-norms-juris-converter-0.19.2.jar")) // implementation("org.apache.commons:commons-text:1.10.0") implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.15.2") diff --git a/frontend/src/components/ExpandableDataSet.vue b/frontend/src/components/ExpandableDataSet.vue index 3f05a5c2a7..a44d31cdac 100644 --- a/frontend/src/components/ExpandableDataSet.vue +++ b/frontend/src/components/ExpandableDataSet.vue @@ -38,8 +38,6 @@ function collapse(): void { 'hover:border-blue-500 hover:bg-blue-200': !isExpanded, 'border-b': borderBottom, }" - close-icon-name="expand_less" - open-icon-name="expand_more" >