title: Not equal to operator in Liquid
body: <p>I am facing a strange problem. As per shopify documentation, != is not equal to. However when I use it, the IDE is not recognizing it. Below is two screenshots. In one when I replace != with == the variable following the == gets highlighted. When I replace it with != the variable is not getting highlighted and the logic is failing too. How do I correct it.</p>
  
  <p>The line I am referring in each image is <code>if tag != 'sweets' or …</code>:</p>
  
  <p><a href="https://i.stack.imgur.com/RDQ53.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RDQ53.png" alt="With != operator"></a></p>
  
  <p><a href="https://i.stack.imgur.com/JrvIv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JrvIv.png" alt="Second pic, replacing != with =="></a></p>
  
  <p><strong><em>Edited</em></strong></p>
  
  <pre class="lang-html prettyprint-override"><code>{% if collection.all_tags.size &gt; 0 %}
  &lt;div class="form-horizontal"&gt;
  &lt;label for="BrowseBy"&gt;{{ 'collections.sorting.city' | t }}&lt;/label&gt;
  {% comment %}Good for /collections/all collection and regular collections{% endcomment %}
  {% if collection.handle %}
      {% capture collection_url %}/collections/{{ collection.handle }}{% unless collection.sort_by == blank %}?sort_by={{ collection.sort_by }}{% endunless %}{% endcapture %}
      {% comment %}Good for automatic type collections{% endcomment %}
  {% elsif collection.current_type %}
      {% assign collection_url = collection.current_type | url_for_type | sort_by: collection.sort_by  %}
      {% comment %}Good for automatic vendor collections{% endcomment %}
  {% elsif collection.current_vendor %}
      {% assign collection_url = collection.current_vendor | url_for_vendor | sort_by: collection.sort_by %}
  {% endif %}
  &lt;select name="BrowseBy" id="BrowseBy" class="btn--tertiary"&gt;
      &lt;option value="{{ collection_url }}"&gt;{{ 'collections.sorting.all_tags' | t }}&lt;/option&gt;
      {% for tag in collection.all_tags %}
      {% if tag == 'jamshedpur' or tag == 'ranchi' %}
          {% capture new_url %}{{ tag | link_to_tag: tag | split: 'href="' | last | split: '"' | first }}{% endcapture %}
          &lt;option{% if current_tags contains tag %} selected{% endif %} value="{{ new_url }}"&gt;{{ tag }}&lt;/option&gt;
      {% endif %}
      {% endfor %}
  &lt;/select&gt;
  &lt;label for="BrowseBy"&gt;{{ 'collections.sorting.category' | t }}&lt;/label&gt;
      &lt;select name="BrowseBy" id="BrowseBy" class="btn--tertiary"&gt;
      &lt;option value="{{ collection_url }}"&gt;{{ 'collections.sorting.all_tags' | t }}&lt;/option&gt;
      {% for tag in collection.all_tags %}
          {% if tag == 'sweets' or tag == 'cake' or tag == 'savories' %}
          {% capture new_url %}{{ tag | link_to_tag: tag | split: 'href="' | last | split: '"' | first }}{% endcapture %}
          &lt;option{% if current_tags contains tag %} selected{% endif %} value="{{ new_url }}"&gt;{{ tag }}&lt;/option&gt;
          {% endif %}
      {% endfor %}
      &lt;/select&gt;
      &lt;label for="BrowseBy"&gt;{{ 'collections.sorting.shop' | t }}&lt;/label&gt;
      &lt;select name="BrowseBy" id="BrowseBy" class="btn--tertiary"&gt;
      &lt;option value="{{ collection_url }}"&gt;{{ 'collections.sorting.all_tags' | t }}&lt;/option&gt;
      {% for tag in collection.all_tags %}
          {% if tag != 'sweets' or tag != 'cake' or tag != 'savories' or tag != 'jamshedpur' or tag != 'ranchi'  %}
          {% capture new_url %}{{ tag | link_to_tag: tag | split: 'href="' | last | split: '"' | first }}{% endcapture %}
          &lt;option{% if current_tags contains tag %} selected{% endif %} value="{{ new_url }}"&gt;{{ tag }}&lt;/option&gt;
          {% endif %}
      {% endfor %}
  &lt;/select&gt;
  &lt;/div&gt;
  {% endif %}
  
  &lt;script&gt;
      $(function() {
      $('#BrowseBy')
      .bind('change', function() {
      location.href = jQuery(this).val();
      }
      );
      });
  &lt;/script&gt;
  </code></pre>