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

renderer.code includes space at beginning of each line of code #1488

Closed
lucaschen opened this issue May 13, 2019 · 1 comment
Closed

renderer.code includes space at beginning of each line of code #1488

lucaschen opened this issue May 13, 2019 · 1 comment
Labels
category: code blocks L1 - broken Valid usage causes incorrect output OR a crash AND there is no known workaround for the issue

Comments

@lucaschen
Copy link

Indented code blocks are rendering with a space at the beginning of each line. Consider the following code:

This is some text.

1. This is a list element.

	```js
	const x = 5;
	const y = x + 5;
	```

This will render with a single space before both lines of code. The problem persists regardless of whether spaces or tabs are used for indentation.

I tried doing a log inside of renderer.code like so:

const renderer = new marked.Renderer();

renderer.code = (code, language) => {
  console.log(code);
}

In code, I can see a space before each line.

@UziTech UziTech added category: code blocks L1 - broken Valid usage causes incorrect output OR a crash AND there is no known workaround for the issue labels May 13, 2019
@UziTech
Copy link
Member

UziTech commented May 3, 2020

This should be fixed in #1645

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: code blocks L1 - broken Valid usage causes incorrect output OR a crash AND there is no known workaround for the issue
Projects
None yet
Development

No branches or pull requests

2 participants