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

Space in code (```) a wrong #1045

Closed
theGABS opened this issue Feb 6, 2018 · 5 comments
Closed

Space in code (```) a wrong #1045

theGABS opened this issue Feb 6, 2018 · 5 comments

Comments

@theGABS
Copy link

theGABS commented Feb 6, 2018

Expectation

Space and tabs show as I wrote

Result

every two space replace with new line

What was attempted

I try extends

renderer.code = (code, language) => {
debugger // code variable already with wrong space
return <pre><code class="lang-${language}">${code}</code></pre>
}

I try use Reveal.js via npm (and React).
And highlight.js

@Feder1co5oave
Copy link
Contributor

Feder1co5oave commented Feb 8, 2018

This is unclear. I think we should update the issue template to make sure people post actual examples of input, output and expected texts. That way we could easily overcome language barriers too.

@theGABS
Copy link
Author

theGABS commented Feb 8, 2018

Okay, tomorrow I will write better example

@theGABS
Copy link
Author

theGABS commented Feb 9, 2018

So, when I wrote

function fancyAlert(arg) {
  if(arg) {
                $.facebox({div:'#foo'})
  }
}

I got
image

Instead of correct tab.
Every two space replace with new line.

@joshbruce joshbruce added L2 - annoying Similar to L1 - broken but there is a known workaround available for the issue category: code blocks and removed question labels Feb 10, 2018
@joshbruce
Copy link
Member

#983

@Feder1co5oave
Copy link
Contributor

I cannot reproduce this:

$ bin/marked 
	function fancyAlert(arg) {
	  if(arg) {
	                $.facebox({div:'#foo'})
	  }
	}
<pre><code>function fancyAlert(arg) {
  if(arg) {
                $.facebox({div:&#39;#foo&#39;})
  }
}
</code></pre>

You're most probably altering either the input or the ouput before/after calling marked()

@joshbruce joshbruce removed the L2 - annoying Similar to L1 - broken but there is a known workaround available for the issue label Feb 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants