Skip to content

Graphs in answer blocks don't render correctly #3

@PipGrylls

Description

@PipGrylls

This code:

> ### Challenge
>
> Use what you just learned to create a scatter plot of `weight` over
> `species_id` with the plot types showing in different colors.
> Is this a good way to show this type of data?
>
> ```{r scatter-challenge-answer, answer=TRUE, purl=FALSE, results='markup'}
> ggplot(data = surveys_complete,
>        mapping = aes(x = species_id, y = weight)) +
>    geom_point(aes(color = plot_type))
> ```
{: .challenge}

Renders to this gfm markdown:

> ### Challenge
> 
> Use what you just learned to create a scatter plot of `weight` over
> `species_id` with the plot types showing in different colors. Is this
> a good way to show this type of data?
> 
> > ## Solution
> > 
> > ggplot(data = surveys\_complete, mapping = aes(x = species\_id, y =
> > weight)) + geom\_point(aes(color = plot\_type))
> > 
> > ![](fig/scatter-challenge-answer-1.png)<!-- --> 
> {: .solution}
>  {:
> > .challenge}

Which breaks due to the challenge tag being incorrectly indented
Potential errors: <!-- --> could break the RegEx?

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions