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

proposal: cmd/mdreplace: introduce concept of "last block" shorthand #79

Open
myitcv opened this issue Oct 23, 2018 · 0 comments
Open

Comments

@myitcv
Copy link
Owner

myitcv commented Oct 23, 2018

It's awkward to have to put the entire template for the output of a __TEMPLATE or __JSON block inside a comment, particularly if the bulk of the comment contains non-template material.

<!-- __JSON: go list -json encoding/json
Package `{{.Out.ImportPath}}` has name `{{.Out.Name}}` and the following doc string:

```
{{.Out.Doc}}
```
-->
<!-- END -->

Instead if would be nice to be able to reference the previous block's output in a shorthand way:

<!-- __JSON: go list -json encoding/json -->

There is no template provided in the previous block. Instead
we can reference the previous block's output using shorthand
<!--!! `{{.Out.Name}}` --><!-- END -->.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant