Closed kennethbruskiewicz closed 8 months ago
It looks like this issue also appears downstream?
https://github.com/microbiomedata/nmdc-server/issues/945 https://github.com/microbiomedata/nmdc-server/issues/1041 https://github.com/microbiomedata/nmdc-server/issues/820
I'll be able to help/ do feedback on Wednesday when back from mini vacation. Right now on gabriola Island, no computer! Ciao, d.
From: Kenneth Bruskiewicz @.***> Sent: August 21, 2023 8:55:35 AM To: cidgoh/DataHarmonizer Cc: Damion Dooley; Review requested Subject: Re: [cidgoh/DataHarmonizer] 388 clickable links (PR #405)
It looks like this issue also appears downstream?
microbiomedata/nmdc-server#945https://github.com/microbiomedata/nmdc-server/issues/945 microbiomedata/nmdc-server#1041https://github.com/microbiomedata/nmdc-server/issues/1041 microbiomedata/nmdc-server#820https://github.com/microbiomedata/nmdc-server/issues/820
— Reply to this email directly, view it on GitHubhttps://github.com/cidgoh/DataHarmonizer/pull/405#issuecomment-1686560993, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AA6QWRTD2PZYPY7U72UBEYLXWN54JANCNFSM6AAAAAA3YRZKBM. You are receiving this because your review was requested.Message ID: @.***>
Just to give some context on the related NMDC issues. This idea did originally in that project, and it would still be beneficial there. However the biggest impetus in that project was actually a component outside of DataHarmonizer where help information from the schema is also displayed. For that work we were really only concerned about linking bare URLs, and we chose to use https://github.com/markdown-it/linkify-it because basic we found simple regex-based approaches to not be robust enough.
The same people who make that package also make a full-blown markdown parser: https://github.com/markdown-it/markdown-it I might suggest looking into that package because it has bare URL linking and takes care of certain security issues by default.
Addresses https://github.com/cidgoh/DataHarmonizer/issues/388, particularly in light of comment https://github.com/cidgoh/DataHarmonizer/issues/388#issuecomment-1500713438 where @pkalita-lbl considered Markdown support.
(Note: as this is my first contribution I'm setting it up as a draft PR, as it may reflect misunderstandings of the codebase.)
Changelog
utils
calledcontent.js
where formatters pertaining to content, rather than data fields, can be placed.content.js
, addsurl2markdown
andurl2anchor
methods to use on arbitrary text.content.js
, adds support of the Marked parser and exposes one to other modules asrenderContent
.HelpSidebar
andtoolbarGettingHelp
components in Markdown.Further Investigations