Skip to content

Commit

Permalink
prepare 1.0.4 release
Browse files Browse the repository at this point in the history
  • Loading branch information
JensKlingenbergEdeka committed Dec 30, 2021
1 parent 4463d88 commit c9086cb
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ val unitsMap = mapOf(
"fr" to "fr",
)


val String.isNumber: Boolean
get() {
return this.toIntOrNull() != null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ fun parseStyleRules(styleRules: ICommonsList<CSSStyleRule>): String {
}


fun read(text: String): CascadingStyleSheet? {
fun parseCascadingStyleSheet(text: String): CascadingStyleSheet? {
/**
* I don't understand this issue, ECSSVersion.CSS30 can only be found by reflection
* otherwise there is always a NoClassDefFoundException
Expand All @@ -46,16 +46,16 @@ fun read(text: String): CascadingStyleSheet? {
class StyleNode(private val htmlStyleNode: Element) : MyNode {

override fun toString(): String {
val hasMediaAttribute = htmlStyleNode.attributes().get("media")
val mediaAttribute = htmlStyleNode.attributes().get("media")

var str = "fun appStylesheet() = object : StyleSheet() {\n" + "init {\n"

val aCSS =
read(htmlStyleNode.data())
parseCascadingStyleSheet(htmlStyleNode.data())

aCSS?.allStyleRules?.let {
str += if (hasMediaAttribute.isNotBlank()) {
parseMediaQuery(hasMediaAttribute, it)
str += if (mediaAttribute.isNotBlank()) {
parseMediaQuery(mediaAttribute, it)
} else {
parseStyleRules(it)
}
Expand Down
2 changes: 1 addition & 1 deletion ideaplugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ plugins {
}

group = "de.jensklingenberg"
version = "1.0.3"
version = "1.0.4"

repositories {
mavenCentral()
Expand Down
9 changes: 4 additions & 5 deletions ideaplugin/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
kotlin.code.style=official
kotlin.version=1.6.10
compose.version=1.0.1-rc2
platformVersion = 2021.2.3

platformVersion=2021.2.3
# See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
# for insight into build numbers and IntelliJ Platform versions.
pluginSinceBuild = 203
pluginUntilBuild = 213.*
pluginVersion = 1.0.3
pluginSinceBuild=203
pluginUntilBuild=213.*
pluginVersion=1.0.4
4 changes: 3 additions & 1 deletion ideaplugin/src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ Into this:
<img src ="https://raw.githubusercontent.com/Foso/HtmlToComposeWebConverter/master/docs/composebutton.png" height=500 />
</p>
## Introduction
<h3> Introduction </h3>
How to use:
1) Put your cursor to the place where you want to insert the Compose code.
2) Open the Plugin under Tools> HTML to Compose Web
<p align="center">
Expand Down

0 comments on commit c9086cb

Please sign in to comment.