# Luquid conflicts with {% raw %} tags

**URL:** <https://talk.jekyllrb.com/t/luquid-conflicts-with-raw-tags/532>\
**Category:** Help\
**Created:** [May 13, 2017, 11:20am UTC](https://talk.jekyllrb.com/t/luquid-conflicts-with-raw-tags/532 "2017-05-13T11:20:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![PatrykKalinowski](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/patrykkalinowski/32/207_2.png) [@PatrykKalinowski](https://talk.jekyllrb.com/u/PatrykKalinowski)\
**Post date:** [May 13, 2017, 11:20am UTC](https://talk.jekyllrb.com/t/luquid-conflicts-with-raw-tags/532/1 "2017-05-13T11:20:35Z")

</div>

I have a blogpost here: [https://patrykkalinowski.com/blog/2016/12/14/blog-search-in-hubspot-cos.html](https://patrykkalinowski.com/blog/2016/12/14/blog-search-in-hubspot-cos.html)  
I have a code snippet which renders with red background and I can’t find a way to fix it.

 ![](https://canada1.discourse-cdn.com/flex030/uploads/jekyllrb/original/1X/2d3f65999c9cf02506b5ff6949d4d665b38dc7a0.png)

The code is:

```auto
{% raw %}
{# you can replace 'default' with your blog id #}
{% set contents = blog_popular_posts('default', 200) %}

{# search query #}
{% set query = request.query_dict['q'] %}

<h1>Search results for: {{ query }}</h1>
{% for content in contents %}
  {% if query|lower in content.name|lower %}
    <h2><a href="{{ content.absolute_url }}">{{ content.name }}</a></h2>
    <p>{{ content.post_summary|striptags }}</p>
  {% endif %}
{% endfor %}
{% endraw %}

```

Any ideas?

---

<div class="post-metadata">

**Author:** ![mmistakes](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/mmistakes/32/2169_2.png) [@mmistakes](https://talk.jekyllrb.com/u/mmistakes)\
**Post date:** [May 13, 2017, 2:37pm UTC](https://talk.jekyllrb.com/t/luquid-conflicts-with-raw-tags/532/2 "2017-05-13T14:37:30Z")

</div>

What language ([lexer](https://github.com/jneen/rouge/wiki/List-of-supported-languages-and-lexers)) are you adding to your code block? I’d suggest `html` as most of your markup is that and might highlight better.

Also are you using backticks or Jekyll’s [`highlight` tag](https://jekyllrb.com/docs/templates/#code-snippet-highlighting)?

````auto
 ```html
 {% raw %}
{# you can replace 'default' with your blog id #}
{% set contents = blog_popular_posts('default', 200) %}

{# search query #}
{% set query = request.query_dict['q'] %}

<h1>Search results for: {{ query }}</h1>
{% for content in contents %}
  {% if query|lower in content.name|lower %}
    <h2><a href="{{ content.absolute_url }}">{{ content.name }}</a></h2>
    <p>{{ content.post_summary|striptags }}</p>
  {% endif %}
{% endfor %}
{% endraw %}

````

```auto

Or

```

{% highlight html %}  
{% raw %}  
{# you can replace ‘default’ with your blog id #}  
{% set contents = blog\_popular\_posts(‘default’, 200) %}

{# search query #}  
{% set query = request.query\_dict[‘q’] %}

# Search results for: {{ query }}
{% for content in contents %} {% if query|lower in content.name|lower %} 
## {{ content.name }}

{{ content.post\_summary|striptags }}

 {% endif %} {% endfor %} {% endraw %} {% endhighlight %} ```

And one other thing. The colors used for syntax highlighting are dependent on your “theme’s” CSS. Jekyll (well really [Rouge](http://rouge.jneen.net/)) doesn’t provide that, so you may need to add tweak the CSS.

---

<div class="post-metadata">

**Author:** ![PatrykKalinowski](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/patrykkalinowski/32/207_2.png) [@PatrykKalinowski](https://talk.jekyllrb.com/u/PatrykKalinowski)\
**Post date:** [May 13, 2017, 4:34pm UTC](https://talk.jekyllrb.com/t/luquid-conflicts-with-raw-tags/532/3 "2017-05-13T16:34:02Z")

</div>

TIL of lexers 🙂  
Thanks a lot @mmistakes, I ended up with using luqid highlighting:

````
 ```liquid

````

Now I need to improve code snippets on my other blogposts 🙂
