quarto-ext / include-code-files

Quarto extension to include code from source files.
MIT License
52 stars 6 forks source link

Feature request - snippet mode #8

Open gcoyle83 opened 11 months ago

gcoyle83 commented 11 months ago

This is a great filter, thank you! I saw in the docs for the pandoc-include-code filter you've cited for inspiration that they have a snippet-mode feature, as well, so the line numbers in the referenced code can change without breaking the reference in the docs:

// start snippet wow
int main() {
    printf("such performance");
}
// end snippet wow

This would be a great feature to enable in this extension. I'd offer to develop it myself, but I have no experience with Lua whatsoever. Thanks again for this extension, it's very useful as is.

rben01 commented 2 months ago

For other prior art, see https://docs.asciidoctor.org/asciidoc/latest/directives/include-tagged-regions/

acederberg commented 2 weeks ago

This would be great to have. In fact, it is not easy to maintain a significant portion of code outside of the notebook (which would have many upsides, such as code formatting that does not require searching for pieces within the quarto document, but that can instead be done on the source document as a whole).

So I might go even a step further and say this is a necessary feature. It does not look like PRs or issues are checked on this repository sadly, and it is a shame because this would be very useful to have.

cderv commented 2 weeks ago

It does not look like PRs or issues are checked on this repository sadly, and it is a shame because this would be very useful to have.

Just let me say that this is unpleasant assumption for the maintainers. We do watch the repo, as many others including main Quarto dev repo.

As any other project, Team is limited and for sure time is limited too. We do our best to do the best work, and this include priorisation.

Maintenance work does not mean adding new feature all the time. And Projects are Open Source - so we welcome any PR by community. If anyone wants to tackle this to add the feature, please do. We'll be happy to review a PR.

acederberg commented 2 weeks ago

Just let me say that this is unpleasant assumption for the maintainers. We do watch the repo, as many others including main Quarto dev repo.

My apologizes, the efforts of the team are appreciated. This (and the rest of quarto) is great. I am running on the on the assumption that in any project some number of features/extensions will be abandoned since there is so much to maintain.

I will contribute per the other thread.

acederberg commented 1 week ago

Addressed in #12