Commit 4d91449d authored by Steven Wittens's avatar Steven Wittens

Quick improvement to autoteaser generation:

added double-width dot and comma, and right-to-left question mark as sentence boundaries.
parent 9541a3a2
......@@ -209,6 +209,18 @@ function node_teaser($body) {
return substr($body, 0, $length + 1);
}
if ($length = strpos($body, '。', $size)) {
return substr($body, 0, $length + 1);
}
if ($length = strpos($body, '、', $size)) {
return substr($body, 0, $length + 1);
}
if ($length = strpos($body, '؟ ', $size)) {
return substr($body, 0, $length + 1);
}
/*
** Nevermind, we split it the hard way ...
*/
......
......@@ -209,6 +209,18 @@ function node_teaser($body) {
return substr($body, 0, $length + 1);
}
if ($length = strpos($body, '。', $size)) {
return substr($body, 0, $length + 1);
}
if ($length = strpos($body, '、', $size)) {
return substr($body, 0, $length + 1);
}
if ($length = strpos($body, '؟ ', $size)) {
return substr($body, 0, $length + 1);
}
/*
** Nevermind, we split it the hard way ...
*/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment