remove empty segments

This commit is contained in:
charbelrami 2022-09-21 11:19:43 -03:00
parent 21a3b0ff20
commit d783f5978e
2 changed files with 3 additions and 3 deletions

View File

@ -382,7 +382,7 @@ keyboardEventToActions msg model =
)
SelectionExpandRight index ->
case previousInteractiveIndex index model.highlightables of
case nextInteractiveIndex index model.highlightables of
Nothing ->
[]

View File

@ -227,7 +227,7 @@ initHighlighter settings previousHighlightables =
if settings.splitOnSentences then
let
segments =
String.split "." CommonControls.romeoAndJulietQuotation
String.split "." (String.dropRight 1 CommonControls.romeoAndJulietQuotation)
segmentCount =
List.length segments
@ -248,7 +248,7 @@ initHighlighter settings previousHighlightables =
segments
else
Highlightable.initFragments Nothing CommonControls.romeoAndJulietQuotation
Highlightable.initFragments Nothing (String.trim CommonControls.romeoAndJulietQuotation)
in
Highlighter.init
{ id = "example-romeo-and-juliet"