Roman Numeral V (5) is not computing correctly #655

Closed
opened 2026-01-29 14:42:12 +00:00 by claunia · 4 comments
Owner

Originally created by @Matt-Scheetz on GitHub (Feb 14, 2024).

Looks like Roman Numeral V does not generate if there are sub-items under the previous item, IV.
Here are tests I ran. Only 1 and 3 passed.

  1. I have a simple list of 6 items it gets correctly converted to a roman numeral html list:
    image
[Test, Description("Simple List")]
public void TestListCreation()
{
    // Arrange
    var input = "Test list:\n\nI. Intro\n\nII. Background\n\nIII. Overall\n\nIV. Conclusion\n\nV. References\n\nVI. Appendix";
    var expected = "<p>Test list:</p>\n<ol type=\"I\">\n<li><p>Intro</p>\n</li>\n<li><p>Background</p>\n</li>\n<li><p>Overall</p>\n</li>\n<li><p>Conclusion</p>\n</li>\n<li><p>References</p>\n</li>\n<li><p>Appendix</p>\n</li>\n</ol>\n";
    var pipeline = new MarkdownPipelineBuilder().UseAdvancedExtensions().Build();

    // Act
    var result = Markdown.ToHtml(input, pipeline);

    // Assert
    Assert.AreEqual(expected, result);
}
  1. List with sub-sections:
    image
[Test, Description("Detailed list with sub-sections")]
public void TestListCreation2()
{
    // Arrange
    var input = "Test list:\n\nI. Intro\n A. Part 1\n B. Part 2\n C. Part3\n\nII. Background\n A. Part 1\n B. Part 2\n C. Part3\n\nIII. Overall\n A. Part 1\n B. Part 2\n C. Part3\n\nIV. Conclusion\n A. Part 1\n B. Part 2\n C. Part3\n\nV. References\n A. Part 1\n B. Part 2\n C. Part3\n\nVI. Appendix\n A. Part 1\n B. Part 2\n C. Part3";
    var expected = "<p>Test list:</p>\n<ol type=\"I\">\n<li>Intro</li>\n</ol>\n<ol type=\"A\">\n<li>Part 1</li>\n<li>Part 2</li>\n<li>Part3</li>\n</ol>\n<ol type=\"I\" start=\"2\">\n<li>Background</li>\n</ol>\n<ol type=\"A\">\n<li>Part 1</li>\n<li>Part 2</li>\n<li>Part3</li>\n</ol>\n<ol type=\"I\" start=\"3\">\n<li>Overall</li>\n</ol>\n<ol type=\"A\">\n<li>Part 1</li>\n<li>Part 2</li>\n<li>Part3</li>\n</ol>\n<ol type=\"I\" start=\"4\">\n<li>Conclusion</li>\n</ol>\n<ol type=\"A\">\n<li>Part 1</li>\n<li>Part 2</li>\n<li>Part3</li>\n</ol>\n<ol type=\"I\" start=\"5\">\n<li>References</li>\n</ol>\n<ol type=\"A\">\n<li>Part 1</li>\n<li>Part 2</li>\n<li>Part3</li>\n</ol>\n<ol type=\"I\" start=\"6\">\n<li>Appendix</li>\n</ol>\n<ol type=\"A\">\n<li>Part 1</li>\n<li>Part 2</li>\n<li>Part3</li>\n</ol>";
    var pipeline = new MarkdownPipelineBuilder().UseAdvancedExtensions().Build();

    // Act
    var result = Markdown.ToHtml(input, pipeline);

    // Assert
    Assert.AreEqual(expected, result);
}
  1. List with no sub-items on item IV but sub-items on V
    image
[Test, Description("List with no sub-itmes on IV but sub-items on V")]
public void TestListCreation4()
{
    // Arrange
    var input = "Test list:\n\nI. Intro\n A. Part 1\n B. Part 2\n C. Part3\n\nII. Background\n A. Part 1\n B. Part 2\n C. Part3\n\nIII. Overall\n A. Part 1\n B. Part 2\n C. Part3\n\nIV. Conclusion\n\nV. References\n A. Part 1\n B. Part 2\n C. Part3\n\nVI. Appendix\n A. Part 1\n B. Part 2\n C. Part3";
    var expected = "<p>Test list:</p>\n<ol type=\"I\">\n<li>Intro</li>\n</ol>\n<ol type=\"A\">\n<li>Part 1</li>\n<li>Part 2</li>\n<li>Part3</li>\n</ol>\n<ol type=\"I\" start=\"2\">\n<li>Background</li>\n</ol>\n<ol type=\"A\">\n<li>Part 1</li>\n<li>Part 2</li>\n<li>Part3</li>\n</ol>\n<ol type=\"I\" start=\"3\">\n<li>Overall</li>\n</ol>\n<ol type=\"A\">\n<li>Part 1</li>\n<li>Part 2</li>\n<li>Part3</li>\n</ol>\n<ol type=\"I\" start=\"4\">\n<li><p>Conclusion</p>\n</li>\n<li><p>References</p>\n</li>\n</ol>\n<ol type=\"A\">\n<li>Part 1</li>\n<li>Part 2</li>\n<li>Part3</li>\n</ol>\n<ol type=\"I\" start=\"6\">\n<li>Appendix</li>\n</ol>\n<ol type=\"A\">\n<li>Part 1</li>\n<li>Part 2</li>\n<li>Part3</li>\n</ol>\n";
    var pipeline = new MarkdownPipelineBuilder().UseAdvancedExtensions().Build();

    // Act
    var result = Markdown.ToHtml(input, pipeline);

    // Assert
    Assert.AreEqual(expected, result);
}
  1. List with sub-items on IV but no sub-items on V
    image
[Test, Description("List with sub-itmes on IV but no sub-items on V")]
public void TestListCreation5()
{
    // Arrange
    var input = "Test list:\n\nI. Intro\n A. Part 1\n B. Part 2\n C. Part3\n\nII. Background\n A. Part 1\n B. Part 2\n C. Part3\n\nIII. Overall\n A. Part 1\n B. Part 2\n C. Part3\n\nIV. Conclusion\n A. Part 1\n B. Part 2\n C. Part3\n\nV. References\n\nVI. Appendix\n A. Part 1\n B. Part 2\n C. Part3";
    var expected = "<p>Test list:</p>\n<ol type=\"I\">\n<li>Intro</li>\n</ol>\n<ol type=\"A\">\n<li>Part 1</li>\n<li>Part 2</li>\n<li>Part3</li>\n</ol>\n<ol type=\"I\" start=\"2\">\n<li>Background</li>\n</ol>\n<ol type=\"A\">\n<li>Part 1</li>\n<li>Part 2</li>\n<li>Part3</li>\n</ol>\n<ol type=\"I\" start=\"3\">\n<li>Overall</li>\n</ol>\n<ol type=\"A\">\n<li>Part 1</li>\n<li>Part 2</li>\n<li>Part3</li>\n</ol>\n<ol type=\"I\" start=\"4\">\n<li>Conclusion</li>\n</ol>\n<ol type=\"A\">\n<li><p>Part 1</p>\n</li>\n<li><p>Part 2</p>\n</li>\n<li><p>Part3</p>\n</li>\n</ol>\n<ol type=\"I\" start=\"5\">\n<li>References</li>\n</ol>\n<ol type=\"I\" start=\"6\">\n<li>Appendix</li>\n</ol>\n<ol type=\"A\">\n<li>Part 1</li>\n<li>Part 2</li>\n<li>Part3</li>\n</ol>\n";
    var pipeline = new MarkdownPipelineBuilder().UseAdvancedExtensions().Build();

    // Act
    var result = Markdown.ToHtml(input, pipeline);

    // Assert
    Assert.AreEqual(expected, result);
}
Originally created by @Matt-Scheetz on GitHub (Feb 14, 2024). Looks like Roman Numeral `V` does not generate if there are sub-items under the previous item, `IV`. Here are tests I ran. Only 1 and 3 passed. 1. I have a simple list of 6 items it gets correctly converted to a roman numeral html list: ![image](https://github.com/xoofx/markdig/assets/120581026/10a65ba6-3ac9-40cf-9232-12b521b28343) ```csharp [Test, Description("Simple List")] public void TestListCreation() { // Arrange var input = "Test list:\n\nI. Intro\n\nII. Background\n\nIII. Overall\n\nIV. Conclusion\n\nV. References\n\nVI. Appendix"; var expected = "<p>Test list:</p>\n<ol type=\"I\">\n<li><p>Intro</p>\n</li>\n<li><p>Background</p>\n</li>\n<li><p>Overall</p>\n</li>\n<li><p>Conclusion</p>\n</li>\n<li><p>References</p>\n</li>\n<li><p>Appendix</p>\n</li>\n</ol>\n"; var pipeline = new MarkdownPipelineBuilder().UseAdvancedExtensions().Build(); // Act var result = Markdown.ToHtml(input, pipeline); // Assert Assert.AreEqual(expected, result); } ``` 2. List with sub-sections: ![image](https://github.com/xoofx/markdig/assets/120581026/039b5321-4055-40f4-84c9-cd67b0dc3f49) ``` csharp [Test, Description("Detailed list with sub-sections")] public void TestListCreation2() { // Arrange var input = "Test list:\n\nI. Intro\n A. Part 1\n B. Part 2\n C. Part3\n\nII. Background\n A. Part 1\n B. Part 2\n C. Part3\n\nIII. Overall\n A. Part 1\n B. Part 2\n C. Part3\n\nIV. Conclusion\n A. Part 1\n B. Part 2\n C. Part3\n\nV. References\n A. Part 1\n B. Part 2\n C. Part3\n\nVI. Appendix\n A. Part 1\n B. Part 2\n C. Part3"; var expected = "<p>Test list:</p>\n<ol type=\"I\">\n<li>Intro</li>\n</ol>\n<ol type=\"A\">\n<li>Part 1</li>\n<li>Part 2</li>\n<li>Part3</li>\n</ol>\n<ol type=\"I\" start=\"2\">\n<li>Background</li>\n</ol>\n<ol type=\"A\">\n<li>Part 1</li>\n<li>Part 2</li>\n<li>Part3</li>\n</ol>\n<ol type=\"I\" start=\"3\">\n<li>Overall</li>\n</ol>\n<ol type=\"A\">\n<li>Part 1</li>\n<li>Part 2</li>\n<li>Part3</li>\n</ol>\n<ol type=\"I\" start=\"4\">\n<li>Conclusion</li>\n</ol>\n<ol type=\"A\">\n<li>Part 1</li>\n<li>Part 2</li>\n<li>Part3</li>\n</ol>\n<ol type=\"I\" start=\"5\">\n<li>References</li>\n</ol>\n<ol type=\"A\">\n<li>Part 1</li>\n<li>Part 2</li>\n<li>Part3</li>\n</ol>\n<ol type=\"I\" start=\"6\">\n<li>Appendix</li>\n</ol>\n<ol type=\"A\">\n<li>Part 1</li>\n<li>Part 2</li>\n<li>Part3</li>\n</ol>"; var pipeline = new MarkdownPipelineBuilder().UseAdvancedExtensions().Build(); // Act var result = Markdown.ToHtml(input, pipeline); // Assert Assert.AreEqual(expected, result); } ``` 3. List with no sub-items on item `IV` but sub-items on `V` ![image](https://github.com/xoofx/markdig/assets/120581026/11886ebe-dc8f-4de2-b68c-e72409dbb39f) ``` csharp [Test, Description("List with no sub-itmes on IV but sub-items on V")] public void TestListCreation4() { // Arrange var input = "Test list:\n\nI. Intro\n A. Part 1\n B. Part 2\n C. Part3\n\nII. Background\n A. Part 1\n B. Part 2\n C. Part3\n\nIII. Overall\n A. Part 1\n B. Part 2\n C. Part3\n\nIV. Conclusion\n\nV. References\n A. Part 1\n B. Part 2\n C. Part3\n\nVI. Appendix\n A. Part 1\n B. Part 2\n C. Part3"; var expected = "<p>Test list:</p>\n<ol type=\"I\">\n<li>Intro</li>\n</ol>\n<ol type=\"A\">\n<li>Part 1</li>\n<li>Part 2</li>\n<li>Part3</li>\n</ol>\n<ol type=\"I\" start=\"2\">\n<li>Background</li>\n</ol>\n<ol type=\"A\">\n<li>Part 1</li>\n<li>Part 2</li>\n<li>Part3</li>\n</ol>\n<ol type=\"I\" start=\"3\">\n<li>Overall</li>\n</ol>\n<ol type=\"A\">\n<li>Part 1</li>\n<li>Part 2</li>\n<li>Part3</li>\n</ol>\n<ol type=\"I\" start=\"4\">\n<li><p>Conclusion</p>\n</li>\n<li><p>References</p>\n</li>\n</ol>\n<ol type=\"A\">\n<li>Part 1</li>\n<li>Part 2</li>\n<li>Part3</li>\n</ol>\n<ol type=\"I\" start=\"6\">\n<li>Appendix</li>\n</ol>\n<ol type=\"A\">\n<li>Part 1</li>\n<li>Part 2</li>\n<li>Part3</li>\n</ol>\n"; var pipeline = new MarkdownPipelineBuilder().UseAdvancedExtensions().Build(); // Act var result = Markdown.ToHtml(input, pipeline); // Assert Assert.AreEqual(expected, result); } ``` 4. List with sub-items on `IV` but no sub-items on `V` ![image](https://github.com/xoofx/markdig/assets/120581026/2b5aae9b-1811-4296-bca9-fda48a106511) ```csharp [Test, Description("List with sub-itmes on IV but no sub-items on V")] public void TestListCreation5() { // Arrange var input = "Test list:\n\nI. Intro\n A. Part 1\n B. Part 2\n C. Part3\n\nII. Background\n A. Part 1\n B. Part 2\n C. Part3\n\nIII. Overall\n A. Part 1\n B. Part 2\n C. Part3\n\nIV. Conclusion\n A. Part 1\n B. Part 2\n C. Part3\n\nV. References\n\nVI. Appendix\n A. Part 1\n B. Part 2\n C. Part3"; var expected = "<p>Test list:</p>\n<ol type=\"I\">\n<li>Intro</li>\n</ol>\n<ol type=\"A\">\n<li>Part 1</li>\n<li>Part 2</li>\n<li>Part3</li>\n</ol>\n<ol type=\"I\" start=\"2\">\n<li>Background</li>\n</ol>\n<ol type=\"A\">\n<li>Part 1</li>\n<li>Part 2</li>\n<li>Part3</li>\n</ol>\n<ol type=\"I\" start=\"3\">\n<li>Overall</li>\n</ol>\n<ol type=\"A\">\n<li>Part 1</li>\n<li>Part 2</li>\n<li>Part3</li>\n</ol>\n<ol type=\"I\" start=\"4\">\n<li>Conclusion</li>\n</ol>\n<ol type=\"A\">\n<li><p>Part 1</p>\n</li>\n<li><p>Part 2</p>\n</li>\n<li><p>Part3</p>\n</li>\n</ol>\n<ol type=\"I\" start=\"5\">\n<li>References</li>\n</ol>\n<ol type=\"I\" start=\"6\">\n<li>Appendix</li>\n</ol>\n<ol type=\"A\">\n<li>Part 1</li>\n<li>Part 2</li>\n<li>Part3</li>\n</ol>\n"; var pipeline = new MarkdownPipelineBuilder().UseAdvancedExtensions().Build(); // Act var result = Markdown.ToHtml(input, pipeline); // Assert Assert.AreEqual(expected, result); } ```
claunia added the questioninvalid labels 2026-01-29 14:42:12 +00:00
Author
Owner

@Matt-Scheetz commented on GitHub (Feb 23, 2024):

@xoofx could you point me in the right direction on where to look for an update here?

@Matt-Scheetz commented on GitHub (Feb 23, 2024): @xoofx could you point me in the right direction on where to look for an update here?
Author
Owner

@snnz commented on GitHub (Dec 18, 2024):

Looks like Roman Numeral V does not generate if there are sub-items under the previous item, IV.

You just do not indent these "sub-items" enough. From the CommonMark spec:

A sublist must be indented the same number of spaces of indentation
a paragraph would need to be in order to be included in the list item.

So what you mistakenly think of as sub-items of IV. is actually a list on the same level as IV., started by A., and V., being of the compatible type, clings to it. Try, for example, this in the last test instead:

var input = "I. Intro\n   A. Part 1\n   B. Part 2\n   C. Part3\n\nII. Background\n    A. Part 1\n    B. Part 2\n    C. Part3\n\nIII. Overall\n     A. Part 1\n     B. Part 2\n     C. Part3\n\nIV. Conclusion\n    A. Part 1\n   B. Part 2\n    C. Part3\n\nV. References\n\nVI. Appendix\n    A. Part 1\n    B. Part 2\n    C. Part3";
@snnz commented on GitHub (Dec 18, 2024): > Looks like Roman Numeral `V` does not generate if there are sub-items under the previous item, `IV`. You just do not indent these "sub-items" enough. From the CommonMark spec: ``` A sublist must be indented the same number of spaces of indentation a paragraph would need to be in order to be included in the list item. ``` So what you mistakenly think of as sub-items of `IV.` is actually a list on the same level as `IV.`, started by `A.`, and `V.`, being of the compatible type, clings to it. Try, for example, this in the last test instead: ```csharp var input = "I. Intro\n A. Part 1\n B. Part 2\n C. Part3\n\nII. Background\n A. Part 1\n B. Part 2\n C. Part3\n\nIII. Overall\n A. Part 1\n B. Part 2\n C. Part3\n\nIV. Conclusion\n A. Part 1\n B. Part 2\n C. Part3\n\nV. References\n\nVI. Appendix\n A. Part 1\n B. Part 2\n C. Part3"; ```
Author
Owner

@Matt-Scheetz commented on GitHub (Dec 18, 2024):

Looks like Roman Numeral V does not generate if there are sub-items under the previous item, IV.

You just do not indent these "sub-items" enough. From the CommonMark spec:

A sublist must be indented the same number of spaces of indentation
a paragraph would need to be in order to be included in the list item.

So what you mistakenly think of as sub-items of IV. is actually a list on the same level as IV., started by A., and V., being of the compatible type, clings to it. Try, for example, this in the last test instead:

var input = "I. Intro\n   A. Part 1\n   B. Part 2\n   C. Part3\n\nII. Background\n    A. Part 1\n    B. Part 2\n    C. Part3\n\nIII. Overall\n     A. Part 1\n     B. Part 2\n     C. Part3\n\nIV. Conclusion\n    A. Part 1\n   B. Part 2\n    C. Part3\n\nV. References\n\nVI. Appendix\n    A. Part 1\n    B. Part 2\n    C. Part3";

When i use your provided input, it does not generate correctly.

input:

var input = "I. Intro\n   A. Part 1\n   B. Part 2\n   C. Part3\n\nII. Background\n    A. Part 1\n    B. Part 2\n    C. Part3\n\nIII. Overall\n     A. Part 1\n     B. Part 2\n     C. Part3\n\nIV. Conclusion\n    A. Part 1\n   B. Part 2\n    C. Part3\n\nV. References\n\nVI. Appendix\n    A. Part 1\n    B. Part 2\n    C. Part3";

my output is

<ol type="I">
<li><p>Intro</p>
<ol type="A">
<li>Part 1</li>
<li>Part 2</li>
<li>Part3</li>
</ol>
</li>
<li><p>Background</p>
<ol type="A">
<li>Part 1</li>
<li>Part 2</li>
<li>Part3</li>
</ol>
</li>
<li><p>Overall</p>
<ol type="A">
<li>Part 1</li>
<li>Part 2</li>
<li>Part3</li>
</ol>
</li>
<li><p>Conclusion</p>
<ol type="A">
<li>Part 1</li>
</ol>
</li>
</ol>
<ol type="A" start="2">
<li><p>Part 2</p>
</li>
<li><p>Part3</p>
</li>
<li><p>References</p>
</li>
</ol>
<ol type="I" start="6">
<li>Appendix
<ol type="A">
<li>Part 1</li>
<li>Part 2</li>
<li>Part3</li>
</ol>
</li>
</ol>

Rendering that to html produces the same result as my original test 5, where the roman numeral V is generated as the next sub-item under roman numeral IV:
image

--- Note ---

I was able to get the list to generate a pseudo roman numeral V after IV with sub-items, but the rendered html created item V as an alpha letter V not roman numeral 5 aka V

input:

var input = "I. Item 1\r\n   1. Sub-item 1.1\r\n   2. Sub-item 1.2\r\n   3. Sub-item 1.3\r\n   4. Sub-item 1.4\r\n\r\nII. Item 2\r\n   1. Sub-item 2.1\r\n   2. Sub-item 2.2\r\n   3. Sub-item 2.3\r\n   4. Sub-item 2.4\r\n\r\nIII. Item 3\r\n   1. Sub-item 3.1\r\n   2. Sub-item 3.2\r\n   3. Sub-item 3.3\r\n   4. Sub-item 3.4\r\n\r\nIV. Item 4\r\n   1. Sub-item 4.1\r\n   2. Sub-item 4.2\r\n   3. Sub-item 4.3\r\n   4. Sub-item 4.4\r\n\r\nV. Item 5\r\n   1. Sub-item 5.1\r\n   2. Sub-item 5.2\r\n   3. Sub-item 5.3\r\n   4. Sub-item 5.4\r\n\r\nVI. Item 6\r\n   1. Sub-item 6.1\r\n   2. Sub-item 6.2\r\n   3. Sub-item 6.3\r\n   4. Sub-item 6.4\r\n";
<ol type="A" start="22">
<li>Item 5
<ol>
<li>Sub-item 5.1</li>
<li>Sub-item 5.2</li>
<li>Sub-item 5.3</li>
<li>Sub-item 5.4</li>
</ol>

image

@Matt-Scheetz commented on GitHub (Dec 18, 2024): > > Looks like Roman Numeral `V` does not generate if there are sub-items under the previous item, `IV`. > > You just do not indent these "sub-items" enough. From the CommonMark spec: > > ``` > A sublist must be indented the same number of spaces of indentation > a paragraph would need to be in order to be included in the list item. > ``` > > So what you mistakenly think of as sub-items of `IV.` is actually a list on the same level as `IV.`, started by `A.`, and `V.`, being of the compatible type, clings to it. Try, for example, this in the last test instead: > > ```cs > var input = "I. Intro\n A. Part 1\n B. Part 2\n C. Part3\n\nII. Background\n A. Part 1\n B. Part 2\n C. Part3\n\nIII. Overall\n A. Part 1\n B. Part 2\n C. Part3\n\nIV. Conclusion\n A. Part 1\n B. Part 2\n C. Part3\n\nV. References\n\nVI. Appendix\n A. Part 1\n B. Part 2\n C. Part3"; > ``` When i use your provided input, it does not generate correctly. input: ```cs var input = "I. Intro\n A. Part 1\n B. Part 2\n C. Part3\n\nII. Background\n A. Part 1\n B. Part 2\n C. Part3\n\nIII. Overall\n A. Part 1\n B. Part 2\n C. Part3\n\nIV. Conclusion\n A. Part 1\n B. Part 2\n C. Part3\n\nV. References\n\nVI. Appendix\n A. Part 1\n B. Part 2\n C. Part3"; ``` my output is ```html <ol type="I"> <li><p>Intro</p> <ol type="A"> <li>Part 1</li> <li>Part 2</li> <li>Part3</li> </ol> </li> <li><p>Background</p> <ol type="A"> <li>Part 1</li> <li>Part 2</li> <li>Part3</li> </ol> </li> <li><p>Overall</p> <ol type="A"> <li>Part 1</li> <li>Part 2</li> <li>Part3</li> </ol> </li> <li><p>Conclusion</p> <ol type="A"> <li>Part 1</li> </ol> </li> </ol> <ol type="A" start="2"> <li><p>Part 2</p> </li> <li><p>Part3</p> </li> <li><p>References</p> </li> </ol> <ol type="I" start="6"> <li>Appendix <ol type="A"> <li>Part 1</li> <li>Part 2</li> <li>Part3</li> </ol> </li> </ol> ``` Rendering that to [html](https://htmledit.squarefree.com/) produces the same result as my original test 5, where the roman numeral `V` is generated as the next sub-item under roman numeral `IV`: ![image](https://github.com/user-attachments/assets/db45a720-2584-4540-8935-6b290543fc91) --- Note --- I was able to get the list to generate a pseudo roman numeral `V` after `IV` with sub-items, but the rendered html created item `V` as an alpha letter `V` not roman numeral 5 aka `V` input: ```cs var input = "I. Item 1\r\n 1. Sub-item 1.1\r\n 2. Sub-item 1.2\r\n 3. Sub-item 1.3\r\n 4. Sub-item 1.4\r\n\r\nII. Item 2\r\n 1. Sub-item 2.1\r\n 2. Sub-item 2.2\r\n 3. Sub-item 2.3\r\n 4. Sub-item 2.4\r\n\r\nIII. Item 3\r\n 1. Sub-item 3.1\r\n 2. Sub-item 3.2\r\n 3. Sub-item 3.3\r\n 4. Sub-item 3.4\r\n\r\nIV. Item 4\r\n 1. Sub-item 4.1\r\n 2. Sub-item 4.2\r\n 3. Sub-item 4.3\r\n 4. Sub-item 4.4\r\n\r\nV. Item 5\r\n 1. Sub-item 5.1\r\n 2. Sub-item 5.2\r\n 3. Sub-item 5.3\r\n 4. Sub-item 5.4\r\n\r\nVI. Item 6\r\n 1. Sub-item 6.1\r\n 2. Sub-item 6.2\r\n 3. Sub-item 6.3\r\n 4. Sub-item 6.4\r\n"; ``` ```html <ol type="A" start="22"> <li>Item 5 <ol> <li>Sub-item 5.1</li> <li>Sub-item 5.2</li> <li>Sub-item 5.3</li> <li>Sub-item 5.4</li> </ol> ``` ![image](https://github.com/user-attachments/assets/0f22e27e-a7fd-418b-aadc-c9406e7c10e1)
Author
Owner

@snnz commented on GitHub (Dec 18, 2024):

I apologize, I'd lost a whitespace before the IV./B. when converted this from the text to the C# string. It should have been:

var input = "I. Intro\n   A. Part 1\n   B. Part 2\n   C. Part3\n\nII. Background\n    A. Part 1\n    B. Part 2\n    C. Part3\n\nIII. Overall\n     A. Part 1\n     B. Part 2\n     C. Part3\n\nIV. Conclusion\n    A. Part 1\n    B. Part 2\n    C. Part3\n\nV. References\n\nVI. Appendix\n    A. Part 1\n    B. Part 2\n    C. Part3";

or in plain text:

I. Intro
   A. Part 1
   B. Part 2
   C. Part3

II. Background
    A. Part 1
    B. Part 2
    C. Part3

III. Overall
     A. Part 1
     B. Part 2
     C. Part3

IV. Conclusion
    A. Part 1
    B. Part 2
    C. Part3

V. References

VI. Appendix
    A. Part 1
    B. Part 2
    C. Part3
@snnz commented on GitHub (Dec 18, 2024): I apologize, I'd lost a whitespace before the `IV.`/`B.` when converted this from the text to the C# string. It should have been: ```csharp var input = "I. Intro\n A. Part 1\n B. Part 2\n C. Part3\n\nII. Background\n A. Part 1\n B. Part 2\n C. Part3\n\nIII. Overall\n A. Part 1\n B. Part 2\n C. Part3\n\nIV. Conclusion\n A. Part 1\n B. Part 2\n C. Part3\n\nV. References\n\nVI. Appendix\n A. Part 1\n B. Part 2\n C. Part3"; ``` or in plain text: ``` I. Intro A. Part 1 B. Part 2 C. Part3 II. Background A. Part 1 B. Part 2 C. Part3 III. Overall A. Part 1 B. Part 2 C. Part3 IV. Conclusion A. Part 1 B. Part 2 C. Part3 V. References VI. Appendix A. Part 1 B. Part 2 C. Part3 ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#655