From 426ab2cce1e93d3844e3c49ae6ad395ef13f6f4b Mon Sep 17 00:00:00 2001 From: 360dgries <139473729+360dgries@users.noreply.github.com> Date: Tue, 3 Oct 2023 09:58:01 -0400 Subject: [PATCH] FI-2198 Markdown processing added to group level (#399) * Markdown processing added to group level * Linted changes * Added canonical link to ensure it is not read as table --- .../TestSuite/TestSuiteDetails/TestGroupCard.tsx | 5 ++++- dev_suites/dev_demo_ig_stu1/groups/demo_group.rb | 8 ++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/client/src/components/TestSuite/TestSuiteDetails/TestGroupCard.tsx b/client/src/components/TestSuite/TestSuiteDetails/TestGroupCard.tsx index c3445c787..1a2550df3 100644 --- a/client/src/components/TestSuite/TestSuiteDetails/TestGroupCard.tsx +++ b/client/src/components/TestSuite/TestSuiteDetails/TestGroupCard.tsx @@ -7,6 +7,7 @@ import InputOutputList from './TestListItem/InputOutputList'; import ResultIcon from './ResultIcon'; import TestRunButton from '~/components/TestSuite/TestRunButton/TestRunButton'; import { shouldShowDescription } from '~/components/TestSuite/TestSuiteUtilities'; +import remarkGfm from 'remark-gfm'; interface TestGroupCardProps { children: React.ReactNode; @@ -22,7 +23,9 @@ const TestGroupCard: FC = ({ children, runnable, runTests, v // render markdown once on mount - it's too slow with re-rendering const description = useMemo(() => { - return runnable.description ? {runnable.description} : undefined; + return runnable.description ? ( + {runnable.description} + ) : undefined; }, [runnable.description]); const runnableType = 'tests' in runnable ? RunnableType.TestGroup : RunnableType.TestSuite; diff --git a/dev_suites/dev_demo_ig_stu1/groups/demo_group.rb b/dev_suites/dev_demo_ig_stu1/groups/demo_group.rb index 3ea8819fd..330ebfd4b 100644 --- a/dev_suites/dev_demo_ig_stu1/groups/demo_group.rb +++ b/dev_suites/dev_demo_ig_stu1/groups/demo_group.rb @@ -9,6 +9,14 @@ class DemoGroup < Inferno::TestGroup # This is a markdown header **Inferno** [github](https://github.com/inferno-framework/inferno-core) + Below is a markdown table + | Column 1 | Column 2 | Column 3 | + | :--- | :---: | ---: | + | Entry 1 | Entry 2 | Entry 3| + | Entry 4 | Entry 5 | Entry 6 | + + This is a dummy canonical link http://hl7.org/fhir/ValueSet/my-valueset|0.8 that should not be + interpreted as a table ) # Inputs and outputs