FLEX-33278 fix check for missing paragraph at end of line
authorJustin Mclean <jmclean@apache.org>
Fri, 19 Jul 2013 01:56:21 +0000 (11:56 +1000)
committerJustin Mclean <jmclean@apache.org>
Fri, 19 Jul 2013 01:56:21 +0000 (11:56 +1000)
textLayout/src/flashx/textLayout/conversion/PlainTextImporter.as

index 49988f0..edc0798 100644 (file)
@@ -102,8 +102,7 @@ package flashx.textLayout.conversion
 
                        // Mark partial last paragraph (string doesn't end in paragraph terminator)
                        if (useClipboardAnnotations && 
-                               (source.lastIndexOf('\u000A', source.length - 2) < 0 || 
-                                       source.lastIndexOf('\u000D\u000A', source.length - 3) < 0))
+                               source.lastIndexOf('\u000A', source.length - 1) != source.length - 1)
                        {
                                var lastLeaf:FlowLeafElement = textFlow.getLastLeaf();
                                lastLeaf.setStyle(ConverterBase.MERGE_TO_NEXT_ON_PASTE, "true");