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

Allow nesting sections in tags #59

Merged
merged 4 commits into from
Jun 7, 2022
Merged

Commits on Dec 18, 2021

  1. Allow nesting sections in tags

    It often happens that only one field from a subsecion is to be rendered.
    For this, one currently has to write `{{#section}}{{field}}{{/section}}`,
    which is quite verbose. This PR adds the posibility to write this as
    `{{section field}}`, or to nest arbitrary many such subsecions, like
    `{{section subsecion field}}`.
    
    Furthermore, it allows opening arbitrarily many sections as
    `{{#section subsecion subsubsection}}`, or closing them as
    `{{/subsubsection subsecion section}}` (in the order they are closed).
    
    Apart from readability, this should also improve rendering performance a bit,
    since unnecessary closing blocks with no HTML data are not added
    (`{{section field}}` doesn't require a closing block, the span of the section
    is automatically calculated).
    
    On my machine, surprisingly, the parsing benchmark also turns out a bit beter
    than before, probably because trimming of whitespace and hashing of fields where
    it is not necessary is eliminated.
    grego committed Dec 18, 2021
    Configuration menu
    Copy the full SHA
    96f89a0 View commit details
    Browse the repository at this point in the history

Commits on Dec 20, 2021

  1. Use the Hash implementation of str for hashing

    This makes the hashes the same as in the `HashMap<&str, V, FnvBuildHasher>`,
    making it possible to get the field directly by its hash.
    grego committed Dec 20, 2021
    Configuration menu
    Copy the full SHA
    dbddb4e View commit details
    Browse the repository at this point in the history

Commits on Dec 23, 2021

  1. Bump pulldown-cmark version

    grego committed Dec 23, 2021
    Configuration menu
    Copy the full SHA
    ffd11bf View commit details
    Browse the repository at this point in the history

Commits on Jun 6, 2022

  1. Make pulldown_cmark optional and the hasher for Ramhorns generic.

    Reduces the number of dependencies and allows more flexibility in
    choosing the hasher.
    grego committed Jun 6, 2022
    Configuration menu
    Copy the full SHA
    b6c675c View commit details
    Browse the repository at this point in the history