diff options
Diffstat (limited to 'create.rb')
-rw-r--r-- | create.rb | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -37,15 +37,17 @@ post '/create' do when REPLY_REGEXP inReplyTo = line.sub(REPLY_REGEXP, '') when ATTACH_REGEXP - url = line.sub(ATTACH_REGEXP, '') + url, description = line.sub(ATTACH_REGEXP, '').split(/\s+/, 2) attachment << { 'type' => 'Document', 'mediaType' => media_type(url), - 'url' => url + 'url' => url, + 'name' => description } else # create links # single quotes in html invalidate digest, reason unknown line.split(/\s+/).each do |word| + word = word.gsub('<p>', '').gsub('</p>', '') case word when HASHTAG_REGEXP tag_url = File.join('https://social.pdp8.info', 'tags', word.sub('#', '')) |