<commit_before>

class Tweet::PageFeature < ParagraphFeature
  include ActionView::Helpers::DateHelper

  feature :tweet_page_tweets, :default_feature => <<-FEATURE
     <cms:tweets>
        <ul>
        <cms:tweet><li><cms:text/> <cms:view_link><cms:ago/></cms:view_link></li></cms:tweet>
        </ul>
      </cms:tweets>
  FEATURE
  

  def tweet_page_tweets_feature(data)
    webiva_feature(:tweet_page_tweets) do |c|
      c.loop_tag('tweet','tweets') { |t| data[:tweets] }
        c.value_tag('tweet:text') { |t| t.locals.tweet['text'] }
        c.date_tag('tweet:date',DEFAULT_DATETIME_FORMAT.t) do |t|  
          begin 
            tm = Time.parse(t.locals.tweet['created_at'])
          rescue Exception
            nil
          end
        end
        
        c.value_tag('tweet:ago') do |t|
          begin 
            tm = Time.parse(t.locals.tweet['created_at'])
            distance_of_time_in_words_to_now(tm) + " ago"
          rescue Exception
            nil
          end
        end
        
        c.link_tag('tweet:view') do |t|
          "http://twitter.com/#{t.locals.tweet['user']['screen_name']}/statuses/#{t.locals.tweet['id']}"
        end
    end
  end
  
  feature :tweet_page_user_tweet, :default_feature => <<-FEATURE
   <div class='twitter_box'>
    <h2>Post to Twitter</h2>

 <a href="<cms:twitter_url />"> Tweet This</a>

    </div>
  FEATURE
  

  def tweet_page_user_tweet_feature(data)
    webiva_feature(:tweet_page_user_tweet) do |c|
      c.value_tag('twitter_url') { |t| data[:twt] }
      c.form_error_tag('form:errors')
       
    end
  end


end
<commit_msg>Switched from value to h tag<commit_after>

class Tweet::PageFeature < ParagraphFeature
  include ActionView::Helpers::DateHelper

  feature :tweet_page_tweets, :default_feature => <<-FEATURE
     <cms:tweets>
        <ul>
        <cms:tweet><li><cms:text/> <cms:view_link><cms:ago/></cms:view_link></li></cms:tweet>
        </ul>
      </cms:tweets>
  FEATURE
  

  def tweet_page_tweets_feature(data)
    webiva_feature(:tweet_page_tweets) do |c|
      c.loop_tag('tweet','tweets') { |t| data[:tweets] }
        c.h_tag('tweet:text') { |t| t.locals.tweet['text'] }
        c.date_tag('tweet:date',DEFAULT_DATETIME_FORMAT.t) do |t|  
          begin 
            tm = Time.parse(t.locals.tweet['created_at'])
          rescue Exception
            nil
          end
        end
        
        c.value_tag('tweet:ago') do |t|
          begin 
            tm = Time.parse(t.locals.tweet['created_at'])
            distance_of_time_in_words_to_now(tm) + " ago"
          rescue Exception
            nil
          end
        end
        
        c.link_tag('tweet:view') do |t|
          "http://twitter.com/#{t.locals.tweet['user']['screen_name']}/statuses/#{t.locals.tweet['id']}"
        end
    end
  end
  
  feature :tweet_page_user_tweet, :default_feature => <<-FEATURE
   <div class='twitter_box'>
    <h2>Post to Twitter</h2>

 <a href="<cms:twitter_url />"> Tweet This</a>

    </div>
  FEATURE
  

  def tweet_page_user_tweet_feature(data)
    webiva_feature(:tweet_page_user_tweet) do |c|
      c.value_tag('twitter_url') { |t| data[:twt] }
      c.form_error_tag('form:errors')
       
    end
  end


end

{'fraction_non_alphanumeric': 0.14555589965933727, 'fraction_numerical': 0.0012387736141220192, 'mean_word_length': 2.4071729957805905, 'pattern_counts': {'":': 0, '<': 51, '<?xml version=': 0, '>': 45, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5308598', 'n_tokens_mistral': 1213, 'n_tokens_neox': 1184, 'n_words': 177}