Skip to content

Commit

Permalink
enable github flavored markdown
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Brue <[email protected]>
  • Loading branch information
ryanabx committed Sep 9, 2024
1 parent 1809258 commit cb6e5d6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ authors = ["Ryan Brue <[email protected]>"]
repository = "https://github.com/ryanabx/simple-ssg"
license = "MIT"
readme = "README.md"
version = "4.0.1"
version = "4.0.2"
edition = "2021"
description = "Plain and simple static site generator for Djot and Markdown light markup languages"

Expand Down
6 changes: 4 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use anyhow::anyhow;
use errors::SsgError;
use jotdown::{Container, Event};
use pulldown_cmark::CowStr;
use pulldown_cmark::{CowStr, Options};
use std::{
env,
path::{Path, PathBuf},
Expand Down Expand Up @@ -265,7 +265,9 @@ fn process_markdown(
file_parent_dir: &Path,
web_prefix: Option<&str>,
) -> anyhow::Result<String> {
let events = pulldown_cmark::Parser::new(markdown_input)
let mut options = Options::empty();
options.insert(Options::ENABLE_GFM);
let events = pulldown_cmark::Parser::new_ext(markdown_input, options)
.map(|event| -> anyhow::Result<pulldown_cmark::Event> {
match event {
pulldown_cmark::Event::Start(pulldown_cmark::Tag::Link {
Expand Down

0 comments on commit cb6e5d6

Please sign in to comment.