common-workflow-language / cwl-v1.3

Apache License 2.0
4 stars 4 forks source link

specify markup format for 'doc' fields #36

Open tetron opened 2 months ago

tetron commented 2 months ago

Doc fields should support markup.

Possible approaches:

mr-c commented 2 months ago

cross-referencing via HTML anchors from the resolved schema-salad identifiers of this and all sub-documents?

see also https://github.com/common-workflow-language/common-workflow-language/issues/293

tetron commented 2 months ago

From discussion: commonmark + HTML is the obvious choice. Should include advice about what HTML tags are safe:

const domPurifyConfig: TDomPurifyConfig = {
    ALLOWED_TAGS: [
        'a',
        'b',
        'blockquote',
        'br',
        'code',
        'del',
        'dd',
        'dl',
        'dt',
        'em',
        'h1',
        'h2',
        'h3',
        'h4',
        'h5',
        'h6',
        'hr',
        'i',
        'img',
        'kbd',
        'li',
        'ol',
        'p',
        'pre',
        's',
        'del',
        'section',
        'span',
        'strong',
        'sub',
        'sup',
        'ul',
        'table',
        'thead',
        'tbody',
        'th',
        'tr',
        'td',
    ],
    ALLOWED_ATTR: ['src', 'width', 'height', 'href', 'alt', 'title', 'style' ],
};
tetron commented 2 months ago

cross-referencing via HTML anchors from the resolved schema-salad identifiers of this and all sub-documents?

see also common-workflow-language/common-workflow-language#293

Yes, should be possible to cross-reference between 'doc' sections using the document id generated by schema salad, with a recommendation that the implementation will have them be the identifiers or will be rewritten to be correct.