Skip to content

Commit

Permalink
Made header rendering compliant with gemini spec
Browse files Browse the repository at this point in the history
  • Loading branch information
Corewala committed May 28, 2022
1 parent 8bb8c4f commit eef63cd
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,19 +104,19 @@ class GemtextAdapter(
}
is GmiViewHolder.H1 -> {
when {
line.length > 2 -> holder.itemView.gemtext_text_textview.text = line.substring(2).trim()
line.length > 2 -> holder.itemView.gemtext_text_textview.text = line.substring(1).trim()
else -> holder.itemView.gemtext_text_textview.text = ""
}
}
is GmiViewHolder.H2 -> {
when {
line.length > 3 -> holder.itemView.gemtext_text_textview.text = line.substring(3).trim()
line.length > 3 -> holder.itemView.gemtext_text_textview.text = line.substring(2).trim()
else -> holder.itemView.gemtext_text_textview.text = ""
}
}
is GmiViewHolder.H3 -> {
when {
line.length > 4 -> holder.itemView.gemtext_text_textview.text = line.substring(4).trim()
line.length > 4 -> holder.itemView.gemtext_text_textview.text = line.substring(3).trim()
else -> holder.itemView.gemtext_text_textview.text = ""
}
}
Expand Down

0 comments on commit eef63cd

Please sign in to comment.