Skip to content

Commit

Permalink
doc, fix: invalid liquid '{{...}}' tags
Browse files Browse the repository at this point in the history
jekyll/liquid got hung up on `{{"Daniel", 26}, {"Jesse", 24}}`.

The reason is that `{{...}}` are used as variables that are replaced by
there values. In this case we have a YAML object that looks the same.
This issue can be fixed by surrounding the block into `{% raw %}...{%
endraw %}` tags.
  • Loading branch information
SGSSGene authored and jbeder committed Aug 6, 2024
1 parent 06c3d1d commit 8fbf344
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/How-To-Emit-YAML.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ produces
# STL Containers, and Other Overloads #
We overload `operator <<` for `std::vector`, `std::list`, and `std::map`, so you can write stuff like:

{% raw %}
```cpp
std::vector <int> squares = {1, 4, 9, 16};

Expand All @@ -165,6 +166,7 @@ out << YAML::Flow << squares;
out << ages;
out << YAML::EndSeq;
```
{% endraw %}
produces
Expand Down

0 comments on commit 8fbf344

Please sign in to comment.