Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FI-2198 Markdown processing added to group level #399

Merged
merged 8 commits into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -22,7 +23,9 @@ const TestGroupCard: FC<TestGroupCardProps> = ({ children, runnable, runTests, v

// render markdown once on mount - it's too slow with re-rendering
const description = useMemo(() => {
return runnable.description ? <ReactMarkdown>{runnable.description}</ReactMarkdown> : undefined;
return runnable.description ? (
<ReactMarkdown remarkPlugins={[remarkGfm]}>{runnable.description}</ReactMarkdown>
) : undefined;
}, [runnable.description]);

const runnableType = 'tests' in runnable ? RunnableType.TestGroup : RunnableType.TestSuite;
Expand Down
8 changes: 8 additions & 0 deletions dev_suites/dev_demo_ig_stu1/groups/demo_group.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading