<commit_before>h1. Textile Helpers

This Rails plugin provides some view helpers that enhance Textile support.

h1. Installation

  script/plugin install <EMAIL>:zeke/textile_helpers.git

As of Rails 2.3, You may also need to install the RedCloth gem..

  sudo gem install redcloth

..and add this to environment.rb

  config.gem "RedCloth"

h2. Overview and Usage

The @textilize_plus@ helper method works just like Rails' "textilize":http://api.rubyonrails.org/classes/ActionView/Helpers/TextHelper.html#M001716 method, but with a few goodies added. It cleans up MS Word characters; repairs (some) faulty markup, such as heading tags (h1, h2, etc) not having a newline underneath them;  adds an id attribute to headings based on the content of the heading.

  textilize_plus(my_string)

The @table_of_contents_for@ helper method is meant to be paired with textilize_plus. It parses your textilizable string and generate a hierarchical table of countents base on the h1, h2, and h3 headings.

<code><pre>
    <div id="main">
      <%= textilize_plus(my_string) %>
    </div>
  
    <div id="sidebar">
      <%= table_of_contents_for(my_string) %>
    </div>
</pre></code>

See lib/textile_helpers.rb for more details.

Copyright (c) 2009 <NAME>, released under the MIT license
<commit_msg>Cleaned up the README a bit<commit_after>h1. Textile Helpers

This Rails plugin provides some view helpers that enhance Textile support.

h2. Installation

  script/plugin install <EMAIL>:zeke/textile_helpers.git

As of Rails 2.3, You may also need to install the RedCloth gem..

  sudo gem install redcloth

..and add this to environment.rb

  config.gem "RedCloth"

h2. Overview and Usage

The @textilize_plus@ helper method works just like Rails' "textilize":http://api.rubyonrails.org/classes/ActionView/Helpers/TextHelper.html#M001716 method, but with a few goodies added. It cleans up MS Word characters; repairs (some) faulty markup, such as heading tags (h1, h2, etc) not having a newline underneath them;  adds an id attribute to headings based on the content of the heading.

  textilize_plus(my_string)

The @table_of_contents_for@ helper method is meant to be paired with textilize_plus. It parses your textilizable string and generate a hierarchical table of countents base on the h1, h2, and h3 headings.

<code><pre>
    <div id="main">
      <%= textilize_plus(my_string) %>
    </div>
  
    <div id="sidebar">
      <%= table_of_contents_for(my_string) %>
    </div>
</pre></code>

See lib/textile_helpers.rb for more details.

Copyright (c) 2009 <NAME>, released under the MIT license

{'fraction_non_alphanumeric': 0.08326908249807248, 'fraction_numerical': 0.015420200462606014, 'mean_word_length': 4.19, 'pattern_counts': {'":': 2, '<': 27, '<?xml version=': 0, '>': 27, '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': '6222435', 'n_tokens_mistral': 860, 'n_tokens_neox': 803, 'n_words': 315}