PASTAplus / DataPortal

EDI Data Portal
3 stars 3 forks source link

Support rendering of markdown in EML "purpose" element #59

Closed robpayn closed 3 years ago

robpayn commented 3 years ago

We make frequent use of the "purpose" element in EML. Currently, it does not appear that markdown formatting defined within a "markdown" tag in the purpose element results in rendering of that formatting in the data portal view. It appears that only the docbooks markup tags can be used to provide some ability to format the text in that element. Are there plans to add a feature to the data portal software that renders markdown content defined in the "purpose" element, as allowed by the latest version of the EML schema and appears to work with other elements like "methods"?

servilla commented 3 years ago

Hi @robpayn - thanks for your comment. Unfortunately, the current implementation of the markdown support is element-by-element. I'll add the <purpose> element into the list of additions for markdown support. Are there any others you are using that I can address in one fell swoop?

Thanks for that thumbs-up @srearl!

servilla commented 3 years ago

@robpayn, do you have an example data package in the Data Portal that uses the <purpose> element? The package identifier or DOI would be great. Thanks.

servilla commented 3 years ago

Markdown support for the <purpose> element is now in effect up through our staging environment. Barring any issues that come up, it will be deployed to production on Wednesday evening 27 October.

robpayn commented 3 years ago

Apologies @servilla. Just realized I never responded to a previous comment. One product we're working on with the latest version of our purpose statement is in staging at https://portal-s.edirepository.org/nis/mapbrowse?packageid=edi.508.1. I'll alter my code to stick a markdown element in there and double check that it works, though it might take me a bit to get to it. If you see @srearl sometime, give him a swift kick in the pants for me. I'm sure he deserves it for something ;)

servilla commented 3 years ago

No worries @robpayn. Remember that the markdown must be completely left-justified in the EML document. I can provide an example if that would help. Also, you can preview the rendering of your metadata here without having to go through the full upload process.

And I'll keep in mind that kick in the pants to @srearl ;-).

robpayn commented 3 years ago

@servilla. I just switched the purpose element in the latest version of package edi.410 on staging to use the markdown tag. Seems to be working.