X-Git-Url: https://git.ao2.it/tweeper.git/blobdiff_plain/83812c773df73f3b73701e0653f42d32979a3b35..4ebdd63156cec839eb683bd04cb530b843412777:/rss_converter_twitter.com.xsl?ds=sidebyside diff --git a/rss_converter_twitter.com.xsl b/rss_converter_twitter.com.xsl index 77b6666..ce2b07f 100644 --- a/rss_converter_twitter.com.xsl +++ b/rss_converter_twitter.com.xsl @@ -24,7 +24,7 @@ xsl:extension-element-prefixes="php" exclude-result-prefixes="php"> - + @@ -32,19 +32,76 @@ https://twitter.com + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + - <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, ' …', ''))"/> @@ -54,22 +111,32 @@ - + <![CDATA[ - + + ]]> - - + + - + + + + + + + + + + @@ -93,10 +160,10 @@ - + - +