-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
first part turns into '<pre><code>' #534
Comments
+1, I don't know why my MD is being wrapped with this as opposed to rendering correctly. Does anyone know why this is happening or what I can do to fix? |
+1, I meet the similar problems. |
This is because your text likely has a lot of indentations, which would be interpreted as a code block. <div>
Hello World
</div> // get inner html
innerHTML = div.innerHTML; // "\n\tHello World\n" will be interpreted as a code block
// try trimming the innerHTML
div.innerHTML = marked(innerHTML.trim()); Alternatively, you could detect the shortest indentation on any line, and use regex to replace that length of indentation on every line. |
I have news, once in a list with all news and once where a single new is showed.
The news on the list has a small cut at 200 chars just like this:
All is working there, the single news is displayed like this:
On the single new the first paragraph is displayed with
<pre><code></code></pre>
.What is the reason for this?
The text was updated successfully, but these errors were encountered: