Skip to content
This repository was archived by the owner on Feb 16, 2025. It is now read-only.

Commit cb6e5d6

Browse files
committed
enable github flavored markdown
Signed-off-by: Ryan Brue <[email protected]>
1 parent 1809258 commit cb6e5d6

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ authors = ["Ryan Brue <[email protected]>"]
44
repository = "https://github.com/ryanabx/simple-ssg"
55
license = "MIT"
66
readme = "README.md"
7-
version = "4.0.1"
7+
version = "4.0.2"
88
edition = "2021"
99
description = "Plain and simple static site generator for Djot and Markdown light markup languages"
1010

src/main.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use anyhow::anyhow;
22
use errors::SsgError;
33
use jotdown::{Container, Event};
4-
use pulldown_cmark::CowStr;
4+
use pulldown_cmark::{CowStr, Options};
55
use std::{
66
env,
77
path::{Path, PathBuf},
@@ -265,7 +265,9 @@ fn process_markdown(
265265
file_parent_dir: &Path,
266266
web_prefix: Option<&str>,
267267
) -> anyhow::Result<String> {
268-
let events = pulldown_cmark::Parser::new(markdown_input)
268+
let mut options = Options::empty();
269+
options.insert(Options::ENABLE_GFM);
270+
let events = pulldown_cmark::Parser::new_ext(markdown_input, options)
269271
.map(|event| -> anyhow::Result<pulldown_cmark::Event> {
270272
match event {
271273
pulldown_cmark::Event::Start(pulldown_cmark::Tag::Link {

0 commit comments

Comments
 (0)