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

When using code snippet from file, if no title is specified, place the file name #392

Open
noam-honig opened this issue Oct 24, 2024 · 2 comments
Labels
enhancement New feature or request pr-welcome Accepting pull requests for this change

Comments

@noam-honig
Copy link
Contributor

Is your feature request related to a problem?

Almost everytime I use a file as a code snippet, I also write the same name of the file as the title for that code snippet

For example:

```file:/frontend/Page.tsx title="frontend/Page.tsx"
```

Describe the solution you'd like.

It'll be great if when no title was specified, the file name will be used as the title by default.

Describe alternatives you've considered.

Writing it manually

Additional context

Love your work

@AriPerkkio AriPerkkio added enhancement New feature or request pr-welcome Accepting pull requests for this change labels Oct 25, 2024
@AriPerkkio
Copy link
Member

[...] the file name will be used as the title by default

With this approach, how could users disable the title?

@noam-honig
Copy link
Contributor Author

@AriPerkkio I think that when you import a file - the common case, is that you'll want its name in the title.
users who will not want a title can set the title to "".

Alternatively - you can add a new flag called autoTitle that'll automatically set the title.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request pr-welcome Accepting pull requests for this change
Projects
None yet
Development

No branches or pull requests

2 participants