private void handleRawText ( TextCursor cursor , int limit , ArrayList < MDText > elements ) { while ( true ) { BasicUrl url = findUrl ( cursor , limit ) ; if ( url != null ) { String link = cursor . text . substring ( url . getStart ( ) , url . getEnd ( ) ) ; // Handling text before url first addText ( cursor , url . getStart ( ) , elements ) ; // Adding url elements . add ( new MDUrl ( link , link ) ) ; // Adjusting offset cursor . currentOffset = url . getEnd ( ) ; continue ; } addText ( cursor , limit , elements ) ; return ; } }
Handling raw text block