diff --git a/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_runtime_0_14_451.xml b/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_runtime_0_14_451.xml deleted file mode 100644 index 6c5b3aa..0000000 --- a/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_runtime_0_14_451.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_runtime_0_14_451.xml b/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_runtime_0_14_451.xml deleted file mode 100644 index 6c5b3aa..0000000 --- a/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_runtime_0_14_451.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_0_14_451.xml b/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_0_14_451.xml deleted file mode 100644 index 4353b0e..0000000 --- a/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_0_14_451.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_runtime_0_14_451.xml b/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_runtime_0_14_451.xml deleted file mode 100644 index 6c5b3aa..0000000 --- a/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_runtime_0_14_451.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_0_14_451.xml b/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_0_14_451.xml deleted file mode 100644 index 4353b0e..0000000 --- a/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_0_14_451.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/build.gradle b/build.gradle index b877726..9c4001c 100644 --- a/build.gradle +++ b/build.gradle @@ -18,7 +18,7 @@ } buildscript { - ext.kotlin_version = '0.14.451' + ext.kotlin_version = '1.+' repositories { maven { url "http://nexus.astraeus.nl/nexus/content/groups/public" diff --git a/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_runtime_0_14_451.xml b/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_runtime_0_14_451.xml deleted file mode 100644 index 6c5b3aa..0000000 --- a/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_runtime_0_14_451.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_0_14_451.xml b/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_0_14_451.xml deleted file mode 100644 index 4353b0e..0000000 --- a/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_0_14_451.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/build.gradle b/build.gradle index b877726..9c4001c 100644 --- a/build.gradle +++ b/build.gradle @@ -18,7 +18,7 @@ } buildscript { - ext.kotlin_version = '0.14.451' + ext.kotlin_version = '1.+' repositories { maven { url "http://nexus.astraeus.nl/nexus/content/groups/public" diff --git a/k2html.iml b/k2html.iml index e7f869f..8f5996e 100644 --- a/k2html.iml +++ b/k2html.iml @@ -1,5 +1,5 @@ - + @@ -18,9 +18,9 @@ - - + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_runtime_0_14_451.xml b/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_runtime_0_14_451.xml deleted file mode 100644 index 6c5b3aa..0000000 --- a/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_runtime_0_14_451.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_0_14_451.xml b/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_0_14_451.xml deleted file mode 100644 index 4353b0e..0000000 --- a/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_0_14_451.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/build.gradle b/build.gradle index b877726..9c4001c 100644 --- a/build.gradle +++ b/build.gradle @@ -18,7 +18,7 @@ } buildscript { - ext.kotlin_version = '0.14.451' + ext.kotlin_version = '1.+' repositories { maven { url "http://nexus.astraeus.nl/nexus/content/groups/public" diff --git a/k2html.iml b/k2html.iml index e7f869f..8f5996e 100644 --- a/k2html.iml +++ b/k2html.iml @@ -1,5 +1,5 @@ - + @@ -18,9 +18,9 @@ - - + + \ No newline at end of file diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/readme.md diff --git a/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_runtime_0_14_451.xml b/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_runtime_0_14_451.xml deleted file mode 100644 index 6c5b3aa..0000000 --- a/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_runtime_0_14_451.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_0_14_451.xml b/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_0_14_451.xml deleted file mode 100644 index 4353b0e..0000000 --- a/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_0_14_451.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/build.gradle b/build.gradle index b877726..9c4001c 100644 --- a/build.gradle +++ b/build.gradle @@ -18,7 +18,7 @@ } buildscript { - ext.kotlin_version = '0.14.451' + ext.kotlin_version = '1.+' repositories { maven { url "http://nexus.astraeus.nl/nexus/content/groups/public" diff --git a/k2html.iml b/k2html.iml index e7f869f..8f5996e 100644 --- a/k2html.iml +++ b/k2html.iml @@ -1,5 +1,5 @@ - + @@ -18,9 +18,9 @@ - - + + \ No newline at end of file diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/readme.md diff --git a/src/nl/astraeus/tag/TagCreator.kt b/src/nl/astraeus/tag/TagCreator.kt index d2b8e94..ddd2245 100644 --- a/src/nl/astraeus/tag/TagCreator.kt +++ b/src/nl/astraeus/tag/TagCreator.kt @@ -10,9 +10,9 @@ return "" } - val out = StringBuilder(Math.max(16, s.length())) - for (i in 0..s.length() - 1) { - val c = s.charAt(i) + val out = StringBuilder(Math.max(16, s.length)) + for (i in 0..s.length - 1) { + val c = s.get(i) if (c.toInt() > 127 || c == '"' || c == '<' || c == '>' || c == '&') { out.append("&#") out.append(c.toInt()) diff --git a/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_runtime_0_14_451.xml b/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_runtime_0_14_451.xml deleted file mode 100644 index 6c5b3aa..0000000 --- a/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_runtime_0_14_451.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_0_14_451.xml b/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_0_14_451.xml deleted file mode 100644 index 4353b0e..0000000 --- a/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_0_14_451.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/build.gradle b/build.gradle index b877726..9c4001c 100644 --- a/build.gradle +++ b/build.gradle @@ -18,7 +18,7 @@ } buildscript { - ext.kotlin_version = '0.14.451' + ext.kotlin_version = '1.+' repositories { maven { url "http://nexus.astraeus.nl/nexus/content/groups/public" diff --git a/k2html.iml b/k2html.iml index e7f869f..8f5996e 100644 --- a/k2html.iml +++ b/k2html.iml @@ -1,5 +1,5 @@ - + @@ -18,9 +18,9 @@ - - + + \ No newline at end of file diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/readme.md diff --git a/src/nl/astraeus/tag/TagCreator.kt b/src/nl/astraeus/tag/TagCreator.kt index d2b8e94..ddd2245 100644 --- a/src/nl/astraeus/tag/TagCreator.kt +++ b/src/nl/astraeus/tag/TagCreator.kt @@ -10,9 +10,9 @@ return "" } - val out = StringBuilder(Math.max(16, s.length())) - for (i in 0..s.length() - 1) { - val c = s.charAt(i) + val out = StringBuilder(Math.max(16, s.length)) + for (i in 0..s.length - 1) { + val c = s.get(i) if (c.toInt() > 127 || c == '"' || c == '<' || c == '>' || c == '&') { out.append("&#") out.append(c.toInt()) diff --git a/test/nl/astraeus/tag/BasicTest.kt b/test/nl/astraeus/tag/BasicTest.kt index 5f90b10..5461992 100644 --- a/test/nl/astraeus/tag/BasicTest.kt +++ b/test/nl/astraeus/tag/BasicTest.kt @@ -18,8 +18,6 @@ html.render().equals("

Hello world!


") } - var tst = html.render(pretty = true) - assertTrue { html.render(pretty = true).equals("
\n

\n Hello world!\n

\n
\n
") }