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

cmd/preguide: support decorators #210

Open
2 tasks
myitcv opened this issue Sep 15, 2022 · 0 comments
Open
2 tasks

cmd/preguide: support decorators #210

myitcv opened this issue Sep 15, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@myitcv
Copy link
Contributor

myitcv commented Sep 15, 2022

Placeholder for decorator support.

We currently vary the output of a step in the declaration of a step itself:

Steps: step1: preguide.#Upload & {
Target: "/home/gopher/somewhere.md"
Renderer: preguide.#RenderLineRanges & {
Lines: [[2,2]]
}
Source: """
This is some markdown `with code`
Another line
A third line
"""
}

This is wrong. Applying ellipsis, or rendering a specific range of lines, is a purely presentational thing.

We should therefore be doing this in "decorators" that modify the result of the step function. Something like:

{{ step "step0" | lineRange [[2,2]] }}
  • Add support for decorators
  • Convert all existing renderers to decorators
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant