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

Validate all components of MdDocument before output #10

Open
Cloud-Awesome opened this issue Sep 23, 2021 · 1 comment
Open

Validate all components of MdDocument before output #10

Cloud-Awesome opened this issue Sep 23, 2021 · 1 comment

Comments

@Cloud-Awesome
Copy link
Owner

Before deleting and creating a new file, validate the output

@Cloud-Awesome
Copy link
Owner Author

Cloud-Awesome commented Oct 18, 2021

Perhaps the best way is to make the Validate function, part of the IDocumentPart interface, and just loop through those?

Would need to be recursive though, for grandchildren... Or, given we have a distinctive list of which child elements always have children, the grandchild validation could be part of the child validators?

Finally, probably need to review the validate functions themselves, as they currently throw the exception, which wouldn't work when we want a full list of errors. Nice wee bit of refactoring required there ;)

@Cloud-Awesome Cloud-Awesome changed the title Validate all components of MdDocument before writing Validate all components of MdDocument before output Oct 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant