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

Insert tabset overtypes existing code #13

Open
Lextuga007 opened this issue Jan 24, 2024 · 2 comments
Open

Insert tabset overtypes existing code #13

Lextuga007 opened this issue Jan 24, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@Lextuga007
Copy link
Contributor

Lextuga007 commented Jan 24, 2024

Following on from the function update in #6 when I have headers like:

## Overview
## Covid cases

And highlight before selecting Insert tabset I get:

::: {.panel-tabset}

## Tab A

## Overview
## Covid cases

## Tab B

Content for Tab B

:::

And I'm really wanting:

::: {.panel-tabset}
## Overview
## Covid cases
::

💮 😄

@matt-dray
Copy link
Owner

Thank you, I agree. We can probably be a bit smarter and guess the user's intention; if two or more headers are selected then they're probably intended as tabset headers. I'll take a look at this.

There might also be some other functions in the package that would benefit from guessing user intention a bit better.

@matt-dray matt-dray added the enhancement New feature or request label Jan 25, 2024
@matt-dray
Copy link
Owner

Note to self: stamp_tabset() is hard-coded for a two-tab tabset. Will need to detect the number of tabsets a user has intended and iterate over them to generate the return string.

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

2 participants