X-Git-Url: https://git.ao2.it/tweeper.git/blobdiff_plain/76afa982386da83e9542278ad3ea736d2fd486ff..e6dab4aed3a61e569cb8d8bb2262ebc0d8f20aef:/rss_converter_twitter.com.xsl diff --git a/rss_converter_twitter.com.xsl b/rss_converter_twitter.com.xsl index 0701d5c..1903607 100644 --- a/rss_converter_twitter.com.xsl +++ b/rss_converter_twitter.com.xsl @@ -32,8 +32,8 @@ https://twitter.com - - + + @@ -44,7 +44,17 @@ - <xsl:value-of select="concat($user-name, ': ', $item-content)"/> + <xsl:value-of select="concat($user-name, ': ')"/> + <!-- + Prepend a space in front of the URLs which are not + preceded by an open parenthesis, for aestethic reasons. + Also, regex, I know: http://xkcd.com/1171/ + --> + <xsl:variable + name="processed-title" + select="php:function('preg_replace', '@((?<!\()(?:http[s]?://|pic.twitter.com))@', ' \1', string($item-content))"/> + <!-- Also strip   and … --> + <xsl:value-of select="normalize-space(translate($processed-title, ' …', ''))"/> @@ -63,7 +73,7 @@ ]]> - +