Skip to content

Commit

Permalink
lesson7: fix random error Kotlin-Polytech#2
Browse files Browse the repository at this point in the history
  • Loading branch information
argraur committed Feb 15, 2022
1 parent 6484885 commit 05e3ded
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lesson7/task1/Files.kt
Original file line number Diff line number Diff line change
Expand Up @@ -312,9 +312,9 @@ fun markdownToHtmlSimple(inputName: String, outputName: String) {
}

lines.forEachIndexed { idx, it ->
val str = it.replace("\t", "")
val str = it.replace("\t", "").replace(" ", "")
if (idx > 0) {
val strPrev = lines[idx - 1].replace("\t", "")
val strPrev = lines[idx - 1].replace("\t", "").replace(" ", "")
if (strPrev == "" || strPrev == " ") {
if (ongoingParagraph) {
builder.append("</p>")
Expand Down

0 comments on commit 05e3ded

Please sign in to comment.