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

Option to omit file extension from title #209

Open
KillyMXI opened this issue Aug 22, 2020 · 2 comments
Open

Option to omit file extension from title #209

KillyMXI opened this issue Aug 22, 2020 · 2 comments

Comments

@KillyMXI
Copy link

Having .md mentioned in the header is not terribly useful.

The simplest option could be to omit the file extension from Title.

Alternatively, Title could be separated, and Filename introduced for the template options to capture the existing behavior.

Title can use the top header in case it's the only one of that level in the document, or fallback to the file name without extension.

This is related to #173 and #193 but different. This issue is about better automatically chosen title.

@ghost
Copy link

ghost commented Feb 23, 2022

To omit the file extension from the title, you can change this line:
https://github.com/yzane/vscode-markdown-pdf/blob/master/extension.js#L327
Change it to var title = path.parse(uri.fsPath).name;, save extension.js and (re)open VS Code.
On my Mac the file was located inside: ~.vscode/extensions/yzane.markdown-pdf-1.4.4.

@jordanbarnes94
Copy link

I would also prefer that the .md file extension was not included in the <title> of the HTML.

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

No branches or pull requests

2 participants