Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix rendering of custom tags with more than one parameter #301

Merged
merged 2 commits into from
Apr 24, 2024

Commits on Apr 23, 2024

  1. Improved parsing of flavor-specific tag 'include_relative'

    * In Jekyll style, 'include_relative' was represented as token SimpleTag,
      instead of IncludeRelative, as expected since PR bkiers#288.
    * As a consequence, filename components were parsed as separate parameters
      instead of token file_name_or_output. This behaviour got unnoticed only
      because all parameters were incorrectly concatenated into one string
      (to be fixed outside of this commit)
    * In Liquid style, tag 'include_relative' is not defined (token InvalidTagId),
      but can be defined as a custom block (token SimpleBlock) or a tag (SimpleTag).
    * To facilitate flavor-specific lexical analysis, flag isLiquidStyleInclude was
      was added to LiquidLexer; same code as in the LiquidParser since bkiers#196
    pmenhart committed Apr 23, 2024
    Configuration menu
    Copy the full SHA
    eb97f95 View commit details
    Browse the repository at this point in the history
  2. Fixed custom tags with more than one parameter

    * All tag parameters were concatenated into one string,
      e.g. {% mu for foo as bar %} was presented as one node ["forfooasbar"] in Tag method render()
    * Caused by combining text of all childen of token 'other_tag_parameters' in NodeVisitor.visitSimple_tag().
      Change to one string in bkiers#227 seems to be not intentional; reverting to a list
    * This commit separates each parameter to a distinct node, i.e. ["for", "foo", "as", "bar"]
    pmenhart committed Apr 23, 2024
    Configuration menu
    Copy the full SHA
    1d0b329 View commit details
    Browse the repository at this point in the history