From 67c2aa1dae16d654cd5cb6cb9cd1f98f5932414d Mon Sep 17 00:00:00 2001 From: mikrise2 Date: Mon, 6 Nov 2023 14:01:45 +0100 Subject: [PATCH] [ML4SE-229] Removed toCss method. It was legacy code, which caused unexpected behaviour in css parsing. --- .../tasktracker/ui/main/panel/template/HtmlBaseTemplate.kt | 6 ++---- .../tasktracker/ui/main/panel/template/css/agreement.css | 1 + 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/ijPlugin/src/main/kotlin/org/jetbrains/research/tasktracker/ui/main/panel/template/HtmlBaseTemplate.kt b/ijPlugin/src/main/kotlin/org/jetbrains/research/tasktracker/ui/main/panel/template/HtmlBaseTemplate.kt index 0b409fa3..2c0a21b9 100644 --- a/ijPlugin/src/main/kotlin/org/jetbrains/research/tasktracker/ui/main/panel/template/HtmlBaseTemplate.kt +++ b/ijPlugin/src/main/kotlin/org/jetbrains/research/tasktracker/ui/main/panel/template/HtmlBaseTemplate.kt @@ -27,17 +27,15 @@ abstract class HtmlBaseTemplate : HtmlTemplate { css ).joinToString(System.lineSeparator()) - protected fun loadCssFromFile(filename: String) = getFileContentFromResources("$CSS_FOLDER/$filename.css").toCss() + protected fun loadCssFromFile(filename: String) = getFileContentFromResources("$CSS_FOLDER/$filename.css") protected fun getFileContentFromResources(path: String) = HtmlBaseTemplate::class.java.getResource(path)?.readText() ?: error("Base file with path `$path` must exist") - private fun String.toCss() = replace("%", "%%") - protected fun String.wrapToSmallText() = lines().wrapToSmallText() - protected fun List.wrapToSmallText() = joinToString(System.lineSeparator()) { + private fun List.wrapToSmallText() = joinToString(System.lineSeparator()) { """

$it

""".trimIndent() diff --git a/ijPlugin/src/main/resources/org/jetbrains/research/tasktracker/ui/main/panel/template/css/agreement.css b/ijPlugin/src/main/resources/org/jetbrains/research/tasktracker/ui/main/panel/template/css/agreement.css index 531bfeb8..ee5f0aa6 100644 --- a/ijPlugin/src/main/resources/org/jetbrains/research/tasktracker/ui/main/panel/template/css/agreement.css +++ b/ijPlugin/src/main/resources/org/jetbrains/research/tasktracker/ui/main/panel/template/css/agreement.css @@ -6,6 +6,7 @@ } .form-group input { + width: 100%; padding: 12px; border-radius: 3px; font-size: 20px;