galaxyproject / galaxyproject/training-material

Incorrect rendering of question box with multiple solutions in generated notebook

Open
#4,319 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
367
Forks
1.1k
Avg merge
16h 27m
Merged PRs (30d)
49

Description

When creating a tutorial with a question box that contains multiple solution dropdowns the automatically generated Jupyter notebook doesn't generate the question box properly causing the cell to render incorrectly.

Here is a basic question box that replicates the issue:

```markdown
> Question Title
>
> Question 1
>
> >
> >
> > Solution 1
> >
> {: .solution}
>
> Question 2
>
> >
> >
> > Solution 2
> >
> {: .solution}
>
> Question 3
>
> >
> >
> > Solution 3
> >
> {: .solution}
>
{: .question}

Text after the question box doesnt get rendered correctly either
```

Rendered in the tutorial:

![image](https://github.com/galaxyproject/training-material/assets/58524460/22f2c0f5-82ee-4b75-be1b-005fa612b381)

Rendered in the Jupyter notebook

![image](https://github.com/galaxyproject/training-material/assets/58524460/01bfefb2-420c-40db-bdff-1d7202d0c17c)

The source code of the notebook cell:

```markdown


Question: Question Title

Question 1



👁 View solution
Solution

Solution 1

Question 2



👁 View solution
Solution

Solution 2



Question 3



👁 View solution
Solution

Solution 3

Text after the question box doesnt get rendered correctly either


```

---

It looks like its generating a `````` tag after every ```{: .solution}``` (not including the first one), however since the only opening blockquote tag is at the start of the question box this causes the rest of the cell's rendering to break.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.