Preview parameter cutting now only at newlines, patch suggested by Ulf Dittmer - thanks!
@@ -311,7 +311,7 @@ public class WeblogPlugin implements Plugin, ParserStagePlugin {
if (preview > 0) {
//
// We start with the first 'preview' number of characters from the text,
- // and then add characters to it until we get to a linebreak or a period.
+ // and then add characters to it until we get to a linebreak.
// The idea is that cutting off at a linebreak is less likely
// to disturb the HTML and leave us with garbled output.
//
@@ -321,11 +321,6 @@ public class WeblogPlugin implements Plugin, ParserStagePlugin {
if (html.charAt(cutoff) == '\r' || html.charAt(cutoff) == '\n') {
hasBeenCutOff = true;
break;
- } else if (html.charAt(cutoff) == '.') {
- // we do want the period
- cutoff++;
- hasBeenCutOff = true;
- break;
}
cutoff++;
}
