Skip to content

Commit 8054cc1

Browse files
author
Michael Whapples
committed
Handle blank print page indicators in eBraille.
1 parent 8850318 commit 8054cc1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • brailleblaster-ebraille/src/main/kotlin/org/brailleblaster/ebraille/bbx2html

brailleblaster-ebraille/src/main/kotlin/org/brailleblaster/ebraille/bbx2html/blocks.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ internal fun Element.processBlock(): Collection<org.jsoup.nodes.Element> = when(
3131

3232
internal fun Element.processPageNum(): org.jsoup.nodes.Element = org.jsoup.nodes.Element("span").attr("role", "doc-pagebreak").apply {
3333
val brl = getFirstChildElement("brl", UTD_NS)
34-
attr("aria-label", brl.getAttributeValue("printPage") ?: "")
35-
appendText(asciiToEbraille(brl.getAttributeValue("printPageBrl") ?: ""))
34+
attr("aria-label", brl.getAttributeValue("printPage").orEmpty().ifEmpty { "-" })
35+
appendText(asciiToEbraille(brl.getAttributeValue("printPageBrl").orEmpty().ifEmpty { "\u2824" }))
3636
}
3737

3838
private fun Element.processStyle(): Collection<org.jsoup.nodes.Element> = when (style) {

0 commit comments

Comments
 (0)