-
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
Replaces every 1., 2., 3. for 1., 1., 1. in every part of the text #1153
Comments
@gonzae thank you for posting this. Two things:
|
Hi @joshbruce, thanks for the quick response. In the spects, there is this sentence:
So, what I get from that is that the start number should be preserved. I understand that the output should be: <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent sagittis accumsan congue. Sed dictum nunc eu eros fringilla tempus. Morbi blandit sapien nunc, id pellentesque lectus pellentesque congue. Proin pulvinar felis et dui commodo, nec venenatis magna pharetra. Nulla facilisi. Sed dictum turpis non libero pharetra rutrum. In egestas pretium dolor a pharetra. Proin id odio a enim ultrices laoreet pellentesque in orci. Duis mattis sapien porttitor, blandit orci ut, molestie metus. Aliquam iaculis ullamcorper massa, a tincidunt leo ullamcorper a. Fusce ante est, vestibulum vitae finibus vitae, convallis at est. Vivamus molestie, felis nec lacinia porttitor, ligula magna mollis erat, dictum luctus turpis neque ut massa. Etiam quis leo sit amet ante rutrum sodales.</p>
<ol>
<li>Lorem ipsum dolor sit amet</li>
</ol>
<p>Proin mi tortor, consectetur et justo nec, viverra aliquet risus. Nulla tincidunt mi enim, sed aliquam augue vehicula in. Phasellus quis velit gravida, porttitor urna id, ornare arcu. Aliquam eget accumsan est, ac pulvinar tortor. Proin ultrices arcu quis semper dictum. Mauris convallis, libero quis tristique cursus, justo sapien bibendum justo, vestibulum laoreet nisl leo ut magna. Aenean mollis scelerisque libero, elementum eleifend libero varius a. Morbi lacinia finibus elit, at finibus dui bibendum ac. Aliquam consequat lacus eu nisi eleifend aliquet. Nulla malesuada ac elit sed interdum.</p>
<ol start="2">
<li>Lorem ipsum dolor sit amet</li>
</ol>
<p>Sed a sapien rutrum, blandit arcu quis, efficitur sem. Duis id viverra urna. Proin non tortor condimentum, suscipit tellus et, varius urna. Curabitur vulputate nibh in orci ullamcorper, id efficitur velit efficitur. Suspendisse id facilisis lectus. Nulla in diam faucibus lorem accumsan iaculis id maximus ante. In erat ligula, scelerisque viverra ante sit amet, aliquet efficitur dolor. Cras aliquam felis vitae luctus finibus.</p>
<ol start="3">
<li>Lorem ipsum dolor sit amet</li>
</ol>
<p>Morbi ut ornare libero. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Fusce non tristique nisl. Ut mauris mi, imperdiet sit amet diam vel, ultricies venenatis augue. Fusce a nunc vel turpis mollis dapibus. Vestibulum nec sem sit amet libero consequat pellentesque. Quisque vel metus arcu. Morbi enim purus, eleifend non dolor in, condimentum facilisis dui. Sed dignissim, nisi a convallis bibendum, lorem nisl cursus massa, eu efficitur odio est ac lorem. Nulla bibendum orci quam, vitae fermentum lacus gravida at. Suspendisse potenti.</p>
<ol start="4">
<li>Lorem ipsum dolor sit amet</li>
</ol>
<p>Sed auctor sem eget consequat rhoncus. Nullam ac erat sagittis, scelerisque urna et, tincidunt nulla. Integer maximus sed quam quis maximus. Maecenas eu metus turpis. Duis ac lacinia arcu. Quisque cursus sapien sit amet egestas mattis. Sed semper leo porttitor risus laoreet mattis. Quisque nec luctus nisl.</p> And that's the output I was expecting. Do you agree? |
Just making a quick note: See #1143 |
@joshbruce I think there might be a problem with the version of marked published to npm. I ran the following code on https://npm.runkit.com/marked marked("1. a\n\nb\n\n2. c"); and it outputs:
but when I run the code against the v0.3.18 release it outputs:
|
Confirmed. Ran through the following diff checker: https://www.diffchecker.com/diff
Not sure how that happened. Will need to put together a 0.3.19 release as NPM won't let us publish over a previous submitted (http://blog.npmjs.org/post/77758351673/no-more-npm-publish-f). Not sure how it happened to be honest and will be more careful in the future to see if we can figure out what happened. |
Marked version: 0.3.16
Expectation
When parsing text to HTML don't assume that every
1.
,2.
,3.
is an ordered list.Result
Replaces every
1.
,2.
,3.
for1.
,1.
,1.
in every part of the textWhat was attempted
It outputs:
And looks like:
The text was updated successfully, but these errors were encountered: