Skip to main content

Tags in liquid

I've got two lines as follows:
{% if OfferCount >= PageStart %}
{% if OfferCount < PageEnd %}The first is fine but the second generates an error - "Expected Tag Name, got something else instead". If I change the second line to:{% if PageEnd > OfferCount %}
it is fine, so it is easy enought to get round in this particular example, but is something which needs sorting.

Status: Completed6 comments

Log in to comment and vote

Comments6

  • Matt Walter changed status to Completed
    Team•

    Oct 5, 2020

    In the bottom right of Code Editor you can now select either HTML or Liquid as the syntax highlighter.

  • Dean Vizer changed status to In Progress
    •

    Aug 18, 2020

  • Dean Vizer changed status to Planned
    •

    Aug 17, 2020

    This is more of a warning from the code editor (although it does display as an error), it will not affect saving the content. The code editor within pages/templates/footers etc. is checking that the content is valid HTML, it is not currently expecting to receive Liquid.
    We're looking at improving the language detection there which will remove these warnings/errors in the future

    • Mark Coleman

      •

      Aug 17, 2020

      Dean Vizer: If the code editor is not expecting to receive liquid, why is it that this is the only one of about 75 lines which produces an error? It seems strange that the less-than operator generates the error but the greater-than does not.

    • Dean Vizer

      •

      Aug 17, 2020

      Mark Coleman: Lines with only liquid in them contain no valid/invalid HTML at all, so they would be ignored. The opening < tag is the beginning of an HTML element (e.g.

      ), as in liquid your code is then < variableName -%} the space invalidates the HTML and throws the error.

  • Dean Vizer

    •

    Aug 17, 2020