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

MDList Does Not Support Complex Structures #20

Closed
jrg94 opened this issue Jul 17, 2021 · 4 comments · Fixed by #21
Closed

MDList Does Not Support Complex Structures #20

jrg94 opened this issue Jul 17, 2021 · 4 comments · Fixed by #21
Assignees
Labels
bug Something isn't working

Comments

@jrg94
Copy link
Member

jrg94 commented Jul 17, 2021

I'm trying to convert all of the existing Sample Programs Docs Generator code over to the new library, but there's a problem. The library doesn't support certain actions that we'd like to replicate. One of those actions is creating list items with multiple links. It never dawned on me that we would need to support this, so the existing MDList code only supports InlineText elements. I'm thinking that MDList should support Paragraphs instead.

For reference, SnakeMD doesn't support this:

- :white_check_mark: [Hello World in C\*](https://sample-programs.therenegadecoder.com/projects/hello-world/c-star) [[Requirements](https://sample-programs.therenegadecoder.com/projects/hello-world)]
@jrg94 jrg94 self-assigned this Jul 17, 2021
@jrg94 jrg94 added the bug Something isn't working label Jul 17, 2021
@jrg94
Copy link
Member Author

jrg94 commented Jul 17, 2021

One thing that's worth mentioning is that this will make MDList code more messy than it already is. Now, we'll need to nest paragraphs in the list. Granted, the new insert_link() method would make this somewhat easier to grapple with.

@jrg94
Copy link
Member Author

jrg94 commented Jul 19, 2021

Ugh, this is going to cause issues. What if the user provides a paragraph marked as code. That's not going to work. I suppose we can add that to the verification.

@jrg94
Copy link
Member Author

jrg94 commented Jul 19, 2021

Decided to add paragraph as an option in MDList. Then, I added a verification error if that Paragraph happens to be a block. I think this should solve the issue.

@jrg94
Copy link
Member Author

jrg94 commented Jul 19, 2021

This does somewhat mess up the convenience methods because they assume InlineText. That means, the user can't really go back and insert links or any of that jazz. Something to think about.

@jrg94 jrg94 linked a pull request Jul 19, 2021 that will close this issue
@jrg94 jrg94 closed this as completed in #21 Jul 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant