-
Notifications
You must be signed in to change notification settings - Fork 7
EDIT: provide raw metadata to exporter #80
base: master
Are you sure you want to change the base?
EDIT: provide raw metadata to exporter #80
Conversation
even though this PR was presented as a way to parse return descriptions, one of the key pieces of this PR is breaking out regarding 58cfcf6, in practice, it's currently not possible that a property in |
by resolving this in the exporter, we can avoid a race condtion where sometimes relatedModule had not been indicated when it should have been.
This and #84 seem to be an improvement. I started to diff the output details.xml, and although my eyes quickly glazed over, I did notice that:
So I merged this pull request and #84 into my code (https://github.com/wkeese/js-doc-parse) and regenerated the 1.8 and 1.9 details.xml and tree.json used on the website. As a side note, I just did the normal merge command:
... but it squashed all the commits into one. Maybe because I had to manually resolve conflicts. Not sure if it's better to keep them separate or not. |
One alternative would be to call processTypeAnnotation() after dojodoc completes, but before the exporter(s) are called. Note though how processTypeAnnotation() in your submitted patch generates HTML but how processTypeAnnotation() in your markdown-exporter branch generates markdown. So if processTypeAnnotation() was in some common code path before the exporters, it would need to generate both HTML and markdown. |
PS: A more radical approach would be that every data type gets exported into details.xml as an object. For example, that CurrencyTextBox's __Constraints datatype would appear as it's own object in the details.xml, the same way as NumberTextBox's __Constraints does, as opposed to having it's definition inlined into the page for CurrencyTextBox. That's probably a better solution because of the consistency, and because then you don't need any special HTML-generating or markdown-generating javascript code. |
many return descriptions contain markdown - some even contain examples
EDIT: this PR now encompasses a number of issues that are somewhat interdependent. the end goal was to provide the raw metadata to the exporter and along the way i found a few bugs that have been fixed and folded into this PR.