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

Leaving Tabs in Fenced Code #2156

Closed
manngo opened this issue Aug 1, 2021 · 1 comment
Closed

Leaving Tabs in Fenced Code #2156

manngo opened this issue Aug 1, 2021 · 1 comment

Comments

@manngo
Copy link

manngo commented Aug 1, 2021

Describe the feature
There may already be way of doing this, but I can’t find it.
Is it possible to get Marked not to replace tabs with spaces in fenced code?

Why is this feature necessary?
I use Marked in an Electron application to render markdown, and it does a brilliant job. However, I have no control over this feature, as far as I am aware.
Personally I prefer tabs, though I know some others don’t. For me, however, it makes copying code easier and formatting output easier if I can have the tabs.

Describe alternatives you've considered
I can undo the spaces using something like replace(/ /g,'\t');, but (a) that’s not 100% reliable, and (b) I think it would make more sense not to have to reverse a feature.
If the solution lies in a custom render function, I’m happy with that.

@UziTech
Copy link
Member

UziTech commented Aug 1, 2021

Duplicate of #1668

There is no way of doing this currently. If you would like to submit a PR to fix it that would be much appreciated. 😁👍

@UziTech UziTech closed this as completed Aug 1, 2021
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