Skip to content

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

@myitcv

Description

@myitcv

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 -->.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions