|
|
|
@ -46,6 +46,21 @@ char* status_render_source( struct status* s, const char* default_server )
|
|
|
|
|
fprintf( f, "<a href='%s' rel='ugc'>%s</a>", url, url );
|
|
|
|
|
free(url);
|
|
|
|
|
|
|
|
|
|
} else if( isalpha(i[1]) && *i == '#' ) {
|
|
|
|
|
i += 1;
|
|
|
|
|
char* start = i;
|
|
|
|
|
while( *i && ( isalpha(*i) || *i == '_' || *i == '-' ) ) ++i;
|
|
|
|
|
char* tag = strndup( start, i - start );
|
|
|
|
|
|
|
|
|
|
printf( "tag = %s\n", tag );
|
|
|
|
|
|
|
|
|
|
fprintf( f, "<a class=\"hashtag\" data-tag=\"%s\" href=\"https://%s/tag/%s\" rel=\"tag ugc\">#%s</a>",
|
|
|
|
|
tag, default_server, tag, tag
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
status_add_tag( s, tag );
|
|
|
|
|
free(tag);
|
|
|
|
|
|
|
|
|
|
} else if( isalpha(i[1]) && *i == '@' ) {
|
|
|
|
|
char* start = i;
|
|
|
|
|
while( *i && !index(" ,\r\n",*i) ) ++i;
|
|
|
|
|