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

feat: add <!-- panvimdoc-only content --> support #48

Merged
merged 3 commits into from
Aug 13, 2023

Conversation

rktjmp
Copy link
Contributor

@rktjmp rktjmp commented Aug 12, 2023

The inverse of <!-- panvimdoc-ignore-start/end -->, where the content is only visible in the vimdoc output. Because we have no control on the mardown renderer, all content must be embedded in the comment, compared to using a start and end marker.

The test is written expecting #47 to be merged.

@rktjmp rktjmp marked this pull request as draft August 12, 2023 12:07
@kdheepak
Copy link
Owner

That is a neat feature! Can we change the name to panvimdoc-include-comment-content?

@rktjmp
Copy link
Contributor Author

rktjmp commented Aug 13, 2023

I was thinking of making another PR to augment the existing "include" function, since as written, the {.include} block ends up in the markdown, eg as:

other-doc.md

Where as if we used a comment it would be invisible, you could have something like <!-- panvimdoc-include other-doc.md arg arg -->.

Obviously I have not written that yet, or looked at how complex it would be to do -- though I guess it should be the same as the current include, just matching on another block type?

Would that influence what name you'd want to give this and the other theoretical PR?

Happy to make whatever change you prefer of course, panvimdoc-include-comment-content and panvimdoc-include-file-content?

@rktjmp rktjmp force-pushed the panvimdoc-only-comments branch 2 times, most recently from 793ca80 to d3ceb43 Compare August 13, 2023 03:44
The inverse of `<!-- panvimdoc-ignore-start/end -->`, where the content
is only visible in the vimdoc output. Because we have no control on the
mardown renderer, all content must be embedded in the comment, instead
of using a start and end marker.
@rktjmp rktjmp marked this pull request as ready for review August 13, 2023 03:46
@kdheepak
Copy link
Owner

kdheepak commented Aug 13, 2023

Interesting PR idea! That PR would be welcome. I believe you can reuse some of the machinery for the existing include functionality.

panvimdoc-include-comment-content and panvimdoc-include-file-content

These seem good to me. I'm open to suggestions as well!

Alternatively, panvimdoc-include-comment and panvimdoc-include-file.

@kdheepak kdheepak merged commit 1f17bd7 into kdheepak:main Aug 13, 2023
1 check passed
@kdheepak
Copy link
Owner

I think I like panvimdoc-include-comment because it is shorter. I made the change corresponding to that and merged it! Thanks for the PR!

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

Successfully merging this pull request may close these issues.

2 participants