X-Git-Url: https://git.ao2.it/tweeper.git/blobdiff_plain/cf9648c2ee5787195e5b2582aa1f93d2a0b69b0d..7f80e1efb56d6ac3186962cbe658d129b84a33cd:/rss_converter_twitter.com.xsl diff --git a/rss_converter_twitter.com.xsl b/rss_converter_twitter.com.xsl index 82d520c..c154141 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,110 @@ https://twitter.com + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + - <xsl:value-of select="concat($user-name, ': ', $item-content)"/> + <xsl:value-of select="concat($user-name, ': ')"/> + <xsl:if test="$item-has-video"> + <xsl:text>(Video) </xsl:text> + </xsl:if> + <!-- + 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:functionString('preg_replace', '@((?<!\()(?:http[s]?://|pic.twitter.com))@', ' \1', $item-content)"/> + <!-- Also strip   and … --> + <xsl:value-of select="normalize-space(translate($processed-title, ' …', ''))"/> @@ -54,16 +145,21 @@ - + <![CDATA[ - + + (Video) + + + ]]> - - + + + @@ -102,10 +198,10 @@ - + - +