|
|
@ -31,8 +31,11 @@ impl Challenge {
|
|
|
|
let arena = Arena::new();
|
|
|
|
let arena = Arena::new();
|
|
|
|
let root = parse_document(
|
|
|
|
let root = parse_document(
|
|
|
|
&arena,
|
|
|
|
&arena,
|
|
|
|
&fs::read_to_string(format!("content/challenges/{number}.md"))
|
|
|
|
& (fs::read_to_string(format!("content/challenges/{number}.md"))
|
|
|
|
.expect("Couldn't find challenge file"),
|
|
|
|
.expect("Couldn't find challenge file")
|
|
|
|
|
|
|
|
// comrak can't find frontmatter if there's only frontmatter and no newline at end
|
|
|
|
|
|
|
|
// TODO: Open issue in comrak
|
|
|
|
|
|
|
|
+ "\n"),
|
|
|
|
&options,
|
|
|
|
&options,
|
|
|
|
);
|
|
|
|
);
|
|
|
|
if let Some(node) = root.children().next() {
|
|
|
|
if let Some(node) = root.children().next() {
|
|
|
|