Closed hgputnam closed 3 years ago
Looking at https://ucsf-cbi.github.io/c4/transfers/amazons3.html, do you mean that the bullet points are now 1,2,3,1? Maybe https://stackoverflow.com/questions/18088955/markdown-continue-numbered-list#18089124 helps?
I actually updated it so it would be in the previous version (I removed the numbered list an used sub-headings). In md it looked lile
some other text
But looking at the actual web page, both were 1.
I'm not sure if you're aware, but Markdown is designed to recognize numbered lists and re-number them automagically so you don't have to, e.g. https://guides.github.com/features/mastering-markdown/:
1. First
1. Second
1. Third
This makes it easy to inject new entries without having to go through an manually renumber them. So, what you're seeing is a feature - you just have to figure out how to write it so that Markdown doesn't think you're starting a new list (when it restarts counting at 1.)
I guess I am not understanding something about the way github.io is presenting the md pages as html. When I used the 'Preview' feature on github, or the md preview on Code it looked as expected. Only when I viewed as an html page from our docs site: https://ucsf-cbi.github.io/c4/transfers/amazons3.html. did I see the 2 become a 1.
It's because the Markdown syntax is not formally defined(*) - it grew out of an ad-hoc implementation, got super popular, and then different Markdown renderers made their own interpretations how it should work. Many surprises come from how single and multiple newlines are handled and what they result in. GitHub Preview differ somewhat from Jekyll, which GitHub Pages and our website uses.
(*) Someone tried, e.g. CommonMark (https://spec.commonmark.org/0.29/). It's super hard to come up with a good solid spec.
Ah, OK. I thought I was making a syntax error or something. I guess we just have to publish and adjust as needed.
But see the StackOverflow post I shared; it looks like it solves the problem you have.
For an example see https://github.com/UCSF-CBI/c4/blob/master/docs/transfers/amazons3.md
Specifically, line 73 starts with 2. in markdown and gets converted to 1. in html.