<commit_before>IE Conditional Tag
==================

This Rails plugin provides an easy way to insert a tag multiple times
in an HTML document with IE conditional comments.  This is an
alternate approach to conditional stylesheets and CSS hacks, and is
explained in detail by <NAME>[1].

Example
-------

Shown generating the `html` tag (as recommended[1]), and adding a
custom class:

    <!DOCTYPE html>
    <%= ie_conditional_tag :html, :class => 'some-custom-class' %>
      <head>
          <title>New HTML5 page</title>
      </head>
      <body>
        <%= yield %>
      </body>
    </html>

This would give you (with some prettied indentation):

    <!DOCTYPE html> 
    <!--[if lt IE 7]><html class="ie6 some-custom-class"><![endif]-->
    <!--[if IE 7]><html class="ie7 some-custom-class"><![endif]-->
    <!--[if IE 8]><html class="ie8 some-custom-class"><![endif]-->
    <!--[if IE 9]><html class="ie9 some-custom-class"><![endif]-->
    <!--[if gt IE 9]><html class="some-custom-class"><![endif]-->
    <!--[if !IE]><!--><html class="some-custom-class"><!--<![endif]--> 
      <head>
          <title>New HTML5 page</title>
      </head>
      <body>
        <!-- your content -->
      </body>
    </html>

Installation
------------

Install as a gem plugin, or directly in `vendor/plugins`.

Then, run the following:

    $ rails generate ie_conditional_tag:install
<commit_msg>Explain alternate helper, block form, work on footnote linking<commit_after>IE Conditional Tag
==================

This Rails plugin provides an easy way to insert a tag multiple times
in an HTML document with IE conditional comments.  This is an
alternate approach to conditional stylesheets and CSS hacks, and is
explained in detail by [<NAME>ish][1].

Example
-------

Shown generating the `html` tag (as [recommended][1]), and adding a
custom class:

    <!DOCTYPE html>
    <%= ie_conditional_tag :html, :class => 'some-custom-class' %>
      <head>
          <title>New HTML5 page</title>
      </head>
      <body>
        <%= yield %>
      </body>
    </html>

This would give you (with some prettied indentation):

    <!DOCTYPE html> 
    <!--[if lt IE 7]><html class="ie6 some-custom-class"><![endif]-->
    <!--[if IE 7]><html class="ie7 some-custom-class"><![endif]-->
    <!--[if IE 8]><html class="ie8 some-custom-class"><![endif]-->
    <!--[if IE 9]><html class="ie9 some-custom-class"><![endif]-->
    <!--[if gt IE 9]><html class="some-custom-class"><![endif]-->
    <!--[if !IE]><!--><html class="some-custom-class"><!--<![endif]--> 
      <head>
          <title>New HTML5 page</title>
      </head>
      <body>
        <!-- your content -->
      </body>
    </html>

`ie_conditional_tag` will also accept a block, so this also works:
  
    <!DOCTYPE html>
    <%= ie_conditional_tag :html, :class => 'some-custom-class' do %>
      <head>
          <title>New HTML5 page</title>
      </head>
      <body>
        <%= yield %>
      </body>
    <% end %>

Wait, that's an ugly name!
--------------------------

We aimed for descriptive and agnostic; you may want to add a helper to
call it, eg:

    module ApplicationHelper

      # ...

      def html_tag(*args, &block)
        ie_conditional_tag(*args, &block)
      end

    end

Installation
------------

Install as a gem plugin, or directly in `vendor/plugins`.

Then, run the following:

    $ rails generate ie_conditional_tag:install

{'fraction_non_alphanumeric': 0.18700614574187885, 'fraction_numerical': 0.007901668129938543, 'mean_word_length': 2.613107822410148, 'pattern_counts': {'":': 0, '<': 93, '<?xml version=': 0, '>': 94, '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': '7669262', 'n_tokens_mistral': 1116, 'n_tokens_neox': 1033, 'n_words': 337}