Android Question BBCodeView - Punctuation marks on the end of the line

js486dog

Active Member
Licensed User
Longtime User
BBCodeView - [Alignment=justify]
also
BBCodeView - [Alignment=left]

Punctuation marks ( . , ! ? : ; ) should be on the end of the line when there is not space between the word and punctuation marks (my son, daughter).

BBCodeView loads text sometimes with punctuation marks on the beginning of the line. As is on the pic1.png.

Please is it possible to load text with punctuation marks on the end of the line? As is on the pic2.png?
 

Attachments

  • pic1.png
    pic1.png
    53.8 KB · Views: 230
  • pic2.png
    pic2.png
    54.4 KB · Views: 222
Last edited:

js486dog

Active Member
Licensed User
Longtime User
Try it with v1.64. The comma will not be treated as a separate token.
Thank you very much Erel.
It works fine:
B4X:
TView.TextEngine.WordBoundariesThatCanConnectToPrevWord=".,':?!"

But I do not know how to do it also with Double Quotation Marks:

"Some long text here with the dot in the end into Double Quotation Marks."
Please look also picture.
 

Attachments

  • double quotation marks.png
    double quotation marks.png
    36.7 KB · Views: 209
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
You can add quotes to this string with:
B4X:
TView.TextEngine.WordBoundariesThatCanConnectToPrevWord=$".,':?!""$

However it will probably won't work as you expect it because there are two adjacent separators here. You can actually try to remove "." from the boundaries characters:
B4X:
TView.TextEngine.WordBoundaries = "&*+-/<>=\' :{}" & TAB & CRLF & Chr(13)
It will be then treated like any other letter.
 
Upvote 0

js486dog

Active Member
Licensed User
Longtime User
You can add quotes to this string with:
B4X:
TView.TextEngine.WordBoundariesThatCanConnectToPrevWord=$".,':?!""$

However it will probably won't work as you expect it because there are two adjacent separators here. You can actually try to remove "." from the boundaries characters:
B4X:
TView.TextEngine.WordBoundaries = "&*+-/<>=\' :{}" & TAB & CRLF & Chr(13)
It will be then treated like any other letter.
Thank you very much Erel this works fine:
B4X:
TView.TextEngine.WordBoundaries = "&*+-/<>=\' :{}" & TAB & CRLF & Chr(13)
 
Upvote 0
Top