nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: toml-rs/toml
Pull request #699 (2024-03-09 18:06:16)

fix(de): cut off multi-line error messages at the end of the first line


Patch:
diff --git a/crates/toml_edit/src/error.rs b/crates/toml_edit/src/error.rs
index bada6670..57aa3df3 100644
--- a/crates/toml_edit/src/error.rs
+++ b/crates/toml_edit/src/error.rs
@@ -125,7 +125,7 @@ impl Display for TomlError {
             // The span will be empty at eof, so we need to make sure we always print at least
             // one `^`
             write!(f, "^")?;
-            for _ in (span.start + 1)..(span.end.min(span.start + content.len())) {
+            for _ in (span.start + 1)..(span.end.min(span.start + content.len() - column)) {
                 write!(f, "^")?;
             }
             writeln!(f)?;


Test patch:
diff --git a/crates/toml/tests/testsuite/de_errors.rs b/crates/toml/tests/testsuite/de_errors.rs
index b3630bd4..9773d928 100644
--- a/crates/toml/tests/testsuite/de_errors.rs
+++ b/crates/toml/tests/testsuite/de_errors.rs
@@ -271,7 +271,7 @@ unknown field `c_d`, expected `c_a` or `c_b`
 TOML parse error at line 6, column 13
   |
 6 |             [[p_b]]
-  |             ^^^^^^^^^^^^^^^^^^^
+  |             ^^^^^^^
 missing field `c_b`
 "
     );
Repository: toml-rs/toml
Pull request #713 (2024-04-18 21:41:09)

fix(parser): Return correct span for multi-byte characters 
This is a step towards addressing rust-lang/cargo#13772


Patch:
diff --git a/crates/toml_edit/src/error.rs b/crates/toml_edit/src/error.rs
index d9630fca..6a278024 100644
--- a/crates/toml_edit/src/error.rs
+++ b/crates/toml_edit/src/error.rs
@@ -21,19 +21,23 @@ impl TomlError {
     ) -> Self {
         use winnow::stream::Stream;
 
+        let message = error.inner().to_string();
+        let raw = raw.finish();
+        let raw = String::from_utf8(raw.to_owned()).expect("original document was utf8");
+
         let offset = error.offset();
-        let span = if offset == raw.len() {
-            offset..offset
+        let mut indices = raw[offset..].char_indices();
+        indices.next();
+        let len = if let Some((index, _)) = indices.next() {
+            index
         } else {
-            offset..(offset + 1)
+            raw.len()
         };
-
-        let message = error.inner().to_string();
-        let raw = raw.finish();
+        let span = offset..(offset + len);
 
         Self {
             message,
-            raw: Some(String::from_utf8(raw.to_owned()).expect("original document was utf8")),
+            raw: Some(raw),
             keys: Vec::new(),
             span: Some(span),
         }


Test patch:
diff --git a/crates/toml_edit/tests/fixtures/invalid/key/special-character.stderr b/crates/toml_edit/tests/fixtures/invalid/key/special-character.stderr
index 7ada2f21..10592cfb 100644
--- a/crates/toml_edit/tests/fixtures/invalid/key/special-character.stderr
+++ b/crates/toml_edit/tests/fixtures/invalid/key/special-character.stderr
@@ -1,5 +1,5 @@
 TOML parse error at line 1, column 1
   |
 1 | μ = "greek small letter mu"
-  | ^
+  | ^^
 invalid key
diff --git a/crates/toml_edit/tests/fixtures/invalid/table/no-close-2.stderr b/crates/toml_edit/tests/fixtures/invalid/table/no-close-2.stderr
index a7adf382..26fc7875 100644
--- a/crates/toml_edit/tests/fixtures/invalid/table/no-close-2.stderr
+++ b/crates/toml_edit/tests/fixtures/invalid/table/no-close-2.stderr
@@ -1,6 +1,6 @@
 TOML parse error at line 1, column 25
   |
 1 | [closing-bracket.missingö
-  |                         ^
+  |                         ^^
 invalid table header
 expected `.`, `]`
diff --git a/crates/toml_edit/tests/testsuite/invalid.rs b/crates/toml_edit/tests/testsuite/invalid.rs
index 5e7acca0..79724163 100644
--- a/crates/toml_edit/tests/testsuite/invalid.rs
+++ b/crates/toml_edit/tests/testsuite/invalid.rs
@@ -209,3 +209,12 @@ dotted key `k1` attempted to extend non-table type (integer)
     let err = toml_input.parse::<toml_edit::DocumentMut>().unwrap_err();
     snapbox::assert_eq(expected_err, err.to_string());
 }
+
+#[test]
+fn emoji_error_span() {
+    let input = "😀";
+    let err = input.parse::<toml_edit::DocumentMut>().unwrap_err();
+    dbg!(err.span());
+    let actual = &input[err.span().unwrap()];
+    assert_eq!(actual, input);
+}
Repository: toml-rs/toml
Pull request #714 (2024-04-19 01:34:30)

fix(parser): Correctly report error spans for end of string
#713 broke this


Patch:
diff --git a/crates/toml_edit/src/error.rs b/crates/toml_edit/src/error.rs
index 6a278024..d0547e2c 100644
--- a/crates/toml_edit/src/error.rs
+++ b/crates/toml_edit/src/error.rs
@@ -31,7 +31,7 @@ impl TomlError {
         let len = if let Some((index, _)) = indices.next() {
             index
         } else {
-            raw.len()
+            raw.len() - offset
         };
         let span = offset..(offset + len);
 


Test patch:
diff --git a/crates/toml_edit/tests/testsuite/invalid.rs b/crates/toml_edit/tests/testsuite/invalid.rs
index 79724163..12a4ba03 100644
--- a/crates/toml_edit/tests/testsuite/invalid.rs
+++ b/crates/toml_edit/tests/testsuite/invalid.rs
@@ -218,3 +218,12 @@ fn emoji_error_span() {
     let actual = &input[err.span().unwrap()];
     assert_eq!(actual, input);
 }
+
+#[test]
+fn text_error_span() {
+    let input = "asdf";
+    let err = input.parse::<toml_edit::DocumentMut>().unwrap_err();
+    dbg!(err.span());
+    let actual = &input[err.span().unwrap()];
+    assert_eq!(actual, "");
+}
Repository: toml-rs/toml
Pull request #715 (2024-04-19 14:15:13)

fix(parser): Ensure error spans are valid for escape sequences
After a `\` in a string, the parser consumes the next character and then validates it.
If the validation fails, it means that the parser is now pointing to the next byte after it which could be within a byte sequence.

We likely want to fix up some of these cases so errors point to the right thing but in the mean time, we should make sure this doesn't produce a bad span.


Patch:
diff --git a/crates/toml_edit/src/error.rs b/crates/toml_edit/src/error.rs
index d0547e2c..57c21ef9 100644
--- a/crates/toml_edit/src/error.rs
+++ b/crates/toml_edit/src/error.rs
@@ -26,6 +26,11 @@ impl TomlError {
         let raw = String::from_utf8(raw.to_owned()).expect("original document was utf8");
 
         let offset = error.offset();
+        let offset = (0..=offset)
+            .rev()
+            .find(|index| raw.is_char_boundary(*index))
+            .unwrap_or(0);
+
         let mut indices = raw[offset..].char_indices();
         indices.next();
         let len = if let Some((index, _)) = indices.next() {


Test patch:
diff --git a/crates/toml_edit/tests/testsuite/invalid.rs b/crates/toml_edit/tests/testsuite/invalid.rs
index 12a4ba03..0d963665 100644
--- a/crates/toml_edit/tests/testsuite/invalid.rs
+++ b/crates/toml_edit/tests/testsuite/invalid.rs
@@ -227,3 +227,12 @@ fn text_error_span() {
     let actual = &input[err.span().unwrap()];
     assert_eq!(actual, "");
 }
+
+#[test]
+fn fuzzed_68144_error_span() {
+    let input = "\"\\ᾂr\"";
+    let err = input.parse::<toml_edit::DocumentMut>().unwrap_err();
+    dbg!(err.span());
+    let actual = &input[err.span().unwrap()];
+    assert_eq!(actual, "ᾂ");
+}
Repository: toml-rs/toml
Pull request #735 (2024-05-23 17:20:57)

chore: Update toml-test


Patch:
diff --git a/Cargo.lock b/Cargo.lock
index a04e4bf7..5ae5fd38 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -732,9 +732,9 @@ dependencies = [
 
 [[package]]
 name = "toml-test-data"
-version = "1.10.0"
+version = "1.11.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cc0448c70dee166ce08111f0b3fabc204c4203a3d71d9bf43dfb24acc21a8c49"
+checksum = "ee3dbefa15e11b0627efd28fdde71c1923efd6dc7dbbf7196c5355d739ebb08c"
 dependencies = [
  "include_dir",
 ]
diff --git a/crates/toml/Cargo.toml b/crates/toml/Cargo.toml
index 32daed86..7cee5258 100644
--- a/crates/toml/Cargo.toml
+++ b/crates/toml/Cargo.toml
@@ -50,7 +50,7 @@ serde_spanned = { version = "0.6.6", path = "../serde_spanned", features = ["ser
 serde = { version = "1.0.199", features = ["derive"] }
 serde_json = "1.0.116"
 toml-test-harness = "0.4.8"
-toml-test-data = "1.8.0"
+toml-test-data = "1.11.0"
 snapbox = "0.5.10"
 
 [[test]]
diff --git a/crates/toml_edit/Cargo.toml b/crates/toml_edit/Cargo.toml
index bec2db6c..cad0ad15 100644
--- a/crates/toml_edit/Cargo.toml
+++ b/crates/toml_edit/Cargo.toml
@@ -50,7 +50,7 @@ serde_spanned = { version = "0.6.6", path = "../serde_spanned", features = ["ser
 [dev-dependencies]
 serde_json = "1.0.116"
 toml-test-harness = "0.4.8"
-toml-test-data = "1.8.0"
+toml-test-data = "1.11.0"
 libtest-mimic = "0.7.2"
 snapbox = { version = "0.5.10", features = ["harness"] }
 


Test patch:
diff --git a/crates/toml_edit/tests/fixtures/invalid/datetime/offset-overflow-hour.stderr b/crates/toml_edit/tests/fixtures/invalid/datetime/offset-overflow-hour.stderr
new file mode 100644
index 00000000..f2254c4b
--- /dev/null
+++ b/crates/toml_edit/tests/fixtures/invalid/datetime/offset-overflow-hour.stderr
@@ -0,0 +1,6 @@
+TOML parse error at line 2, column 25
+  |
+2 | d = 1985-06-18 17:04:07+25:00
+  |                         ^
+invalid time offset
+value is out of range
diff --git a/crates/toml_edit/tests/fixtures/invalid/datetime/offset-overflow-minute.stderr b/crates/toml_edit/tests/fixtures/invalid/datetime/offset-overflow-minute.stderr
new file mode 100644
index 00000000..ce42d2ed
--- /dev/null
+++ b/crates/toml_edit/tests/fixtures/invalid/datetime/offset-overflow-minute.stderr
@@ -0,0 +1,6 @@
+TOML parse error at line 3, column 28
+  |
+3 | d = 1985-06-18 17:04:07+12:61
+  |                            ^
+invalid time offset
+value is out of range
Repository: toml-rs/toml
Pull request #932 (2025-06-06 19:34:58)

fix(edit): Implicitly convert tables, rather than throwaway
I believe this will help with cases like #762.

I've had this branch sitting around for a while and I'm unsure why I never moved forward with it.  Maybe because this glosses over user bugs?  Except we allow this kind of sloppiness in other cases.


Patch:
diff --git a/crates/toml_edit/src/inline_table.rs b/crates/toml_edit/src/inline_table.rs
index e999fcd7..866acd8f 100644
--- a/crates/toml_edit/src/inline_table.rs
+++ b/crates/toml_edit/src/inline_table.rs
@@ -71,6 +71,9 @@ impl InlineTable {
                 Item::Value(value) => {
                     values.push((path, value));
                 }
+                Item::Table(table) => {
+                    table.append_all_values(&path, values);
+                }
                 _ => {}
             }
         }
diff --git a/crates/toml_edit/src/table.rs b/crates/toml_edit/src/table.rs
index 43464d24..0ad02da3 100644
--- a/crates/toml_edit/src/table.rs
+++ b/crates/toml_edit/src/table.rs
@@ -99,6 +99,34 @@ impl Table {
         }
     }
 
+    pub(crate) fn append_all_values<'s>(
+        &'s self,
+        parent: &[&'s Key],
+        values: &mut Vec<(Vec<&'s Key>, &'s Value)>,
+    ) {
+        for (key, value) in self.items.iter() {
+            let mut path = parent.to_vec();
+            path.push(key);
+            match value {
+                Item::Table(table) => {
+                    table.append_all_values(&path, values);
+                }
+                Item::Value(value) => {
+                    if let Some(table) = value.as_inline_table() {
+                        if table.is_dotted() {
+                            table.append_values(&path, values);
+                        } else {
+                            values.push((path, value));
+                        }
+                    } else {
+                        values.push((path, value));
+                    }
+                }
+                _ => {}
+            }
+        }
+    }
+
     /// Auto formats the table.
     pub fn fmt(&mut self) {
         decorate_table(self);


Test patch:
diff --git a/crates/toml_edit/tests/testsuite/edit.rs b/crates/toml_edit/tests/testsuite/edit.rs
index c970c577..869a1230 100644
--- a/crates/toml_edit/tests/testsuite/edit.rs
+++ b/crates/toml_edit/tests/testsuite/edit.rs
@@ -1465,3 +1465,18 @@ fn assert_key_value_roundtrip(input: &str, expected: impl IntoData) {
     });
     assert_data_eq!(actual, expected.raw());
 }
+
+#[test]
+fn table_under_inline() {
+    let mut doc = DocumentMut::new();
+    doc["tool"]["typst-test"] = table();
+    doc["tool"]["typst-test"]["tests"] = value("tests");
+
+    assert_data_eq!(
+        doc.to_string(),
+        str![[r#"
+tool = { typst-test.tests = "tests" }
+
+"#]]
+    );
+}
Repository: djc/askama
Pull request #265 (2019-10-08 09:33:25)

Add support for boolean literals

djc: Makes sense, thanks!

Patch:
diff --git a/askama_derive/src/generator.rs b/askama_derive/src/generator.rs
index 7757016..28b8246 100644
--- a/askama_derive/src/generator.rs
+++ b/askama_derive/src/generator.rs
@@ -865,6 +865,7 @@ impl<'a> Generator<'a> {
 
     fn visit_expr(&mut self, buf: &mut Buffer, expr: &Expr) -> DisplayWrap {
         match *expr {
+            Expr::BoolLit(s) => self.visit_bool_lit(buf, s),
             Expr::NumLit(s) => self.visit_num_lit(buf, s),
             Expr::StrLit(s) => self.visit_str_lit(buf, s),
             Expr::Var(s) => self.visit_var(buf, s),
@@ -1127,6 +1128,11 @@ impl<'a> Generator<'a> {
         DisplayWrap::Unwrapped
     }
 
+    fn visit_bool_lit(&mut self, buf: &mut Buffer, s: &str) -> DisplayWrap {
+        buf.write(s);
+        DisplayWrap::Unwrapped
+    }
+
     fn visit_str_lit(&mut self, buf: &mut Buffer, s: &str) -> DisplayWrap {
         buf.write(&format!("\"{}\"", s));
         DisplayWrap::Unwrapped
diff --git a/askama_derive/src/parser.rs b/askama_derive/src/parser.rs
index b8fa94d..eaa4b62 100644
--- a/askama_derive/src/parser.rs
+++ b/askama_derive/src/parser.rs
@@ -8,6 +8,7 @@ use askama_shared::Syntax;
 
 #[derive(Debug)]
 pub enum Expr<'a> {
+    BoolLit(&'a str),
     NumLit(&'a str),
     StrLit(&'a str),
     Var(&'a str),
@@ -200,6 +201,11 @@ fn non_ascii(chr: u8) -> bool {
     chr >= 0x80 && chr <= 0xFD
 }
 
+named!(expr_bool_lit<Input, Expr>, map!(
+    alt!(tag!("true") | tag!("false")),
+    |s| Expr::BoolLit(str::from_utf8(&s).unwrap())
+));
+
 named!(num_lit<Input, &str>, map!(nom::digit,
     |s| str::from_utf8(s.0).unwrap()
 ));
@@ -376,6 +382,7 @@ named!(expr_group<Input, Expr>, map!(
 ));
 
 named!(expr_single<Input, Expr>, alt!(
+    expr_bool_lit |
     expr_num_lit |
     expr_str_lit |
     expr_path |


Test patch:
diff --git a/testing/templates/literals.html b/testing/templates/literals.html
index b8d8fbe..9d973bb 100644
--- a/testing/templates/literals.html
+++ b/testing/templates/literals.html
@@ -1,1 +1,3 @@
 {{ "a" }}
+{{ true }}
+{{ false }}
diff --git a/testing/tests/simple.rs b/testing/tests/simple.rs
index e4239ce..519b87c 100644
--- a/testing/tests/simple.rs
+++ b/testing/tests/simple.rs
@@ -114,7 +114,7 @@ struct LiteralsTemplate {}
 #[test]
 fn test_literals() {
     let s = LiteralsTemplate {};
-    assert_eq!(s.render().unwrap(), "a");
+    assert_eq!(s.render().unwrap(), "a\ntrue\nfalse");
 }
 
 struct Holder {
Repository: djc/askama
Pull request #433 (2021-01-11 18:51:24)

Changed so uppercase variables passthrough as constants
Resolves #432

Fixes so that variables including an uppercase letter, doesn't get prefixed `self.`, i.e. `{{ FOO }}` results in `FOO` instead of `self.FOO`.


vallentin: This indirectly also fixes so that `{{ None }}` results in `None` instead of `self.None` (that's why I only check for a single uppercase char).

However, `{{ Some("foo") }}` is also interpreted as a variable it seems. It at least incorrectly generates `(self.Some)("foo")`. I'll fix that in a future PR.


Patch:
diff --git a/askama_shared/src/generator.rs b/askama_shared/src/generator.rs
index 801db37..866fd7b 100644
--- a/askama_shared/src/generator.rs
+++ b/askama_shared/src/generator.rs
@@ -1721,8 +1721,11 @@ impl MapChain<'_, &str, LocalMeta> {
     }
 
     fn resolve_or_self(&self, name: &str) -> String {
-        self.resolve(name)
-            .unwrap_or_else(|| format!("self.{}", name))
+        match self.resolve(name) {
+            Some(name) => name,
+            None if name.chars().any(char::is_uppercase) => name.to_string(),
+            None => format!("self.{}", name),
+        }
     }
 }
 


Test patch:
diff --git a/testing/tests/simple.rs b/testing/tests/simple.rs
index 0c6b17e..e7fca2c 100644
--- a/testing/tests/simple.rs
+++ b/testing/tests/simple.rs
@@ -72,6 +72,36 @@ fn test_variables_no_escape() {
     );
 }
 
+#[derive(Template)]
+#[template(
+    source = "{{ foo }} {{ foo_bar }} {{ FOO }} {{ FOO_BAR }} {{ self::FOO }} {{ self::FOO_BAR }} {{ Self::BAR }} {{ Self::BAR_BAZ }}",
+    ext = "txt"
+)]
+struct ConstTemplate {
+    foo: &'static str,
+    foo_bar: &'static str,
+}
+
+impl ConstTemplate {
+    const BAR: &'static str = "BAR";
+    const BAR_BAZ: &'static str = "BAR BAZ";
+}
+
+#[test]
+fn test_constants() {
+    let t = ConstTemplate {
+        foo: "foo",
+        foo_bar: "foo bar",
+    };
+    assert_eq!(
+        t.render().unwrap(),
+        "foo foo bar FOO FOO BAR FOO FOO BAR BAR BAR BAZ"
+    );
+}
+
+const FOO: &str = "FOO";
+const FOO_BAR: &str = "FOO BAR";
+
 #[derive(Template)]
 #[template(path = "if.html")]
 struct IfTemplate {
Repository: djc/askama
Pull request #452 (2021-02-22 02:02:13)

Removed needless borrow of range
Before `.zip(10..20)` would result in `.zip(&(10..20))` which is not valid.

- Removed needless borrow of range
- Added test case for `(0..10).zip(10..20).zip(20..30)`

When adding the test case, I realized that Askama cannot parse `{% for ((i, j), k) in (0..10).zip(10..20).zip(20..30) %}`, specifically the for loop pattern `((i, j), k)`.

Reference #451



Patch:
diff --git a/askama_shared/src/parser.rs b/askama_shared/src/parser.rs
index 80f766a..b91934b 100644
--- a/askama_shared/src/parser.rs
+++ b/askama_shared/src/parser.rs
@@ -66,6 +66,7 @@ impl Expr<'_> {
             BinOp(_, lhs, rhs) => {
                 lhs.is_copyable_within_op(true) && rhs.is_copyable_within_op(true)
             }
+            Range(..) => true,
             // The result of a call likely doesn't need to be borrowed,
             // as in that case the call is more likely to return a
             // reference in the first place then.


Test patch:
diff --git a/testing/tests/loops.rs b/testing/tests/loops.rs
index 809f75e..b324ae3 100644
--- a/testing/tests/loops.rs
+++ b/testing/tests/loops.rs
@@ -70,11 +70,11 @@ fn test_for_range() {
 
 #[derive(Template)]
 #[template(source = "{% for i in [1, 2, 3] %}{{ i }}{% endfor %}", ext = "txt")]
-struct ForArrayTemplate {}
+struct ForArrayTemplate;
 
 #[test]
 fn test_for_array() {
-    let t = ForArrayTemplate {};
+    let t = ForArrayTemplate;
     assert_eq!(t.render().unwrap(), "123");
 }
 
@@ -83,11 +83,11 @@ fn test_for_array() {
     source = "{% for i in [1, 2, 3].iter() %}{{ i }}{% endfor %}",
     ext = "txt"
 )]
-struct ForMethodCallTemplate {}
+struct ForMethodCallTemplate;
 
 #[test]
 fn test_for_method_call() {
-    let t = ForMethodCallTemplate {};
+    let t = ForMethodCallTemplate;
     assert_eq!(t.render().unwrap(), "123");
 }
 
@@ -108,10 +108,26 @@ fn test_for_path_call() {
     source = "{% for i in [1, 2, 3, 4, 5][3..] %}{{ i }}{% endfor %}",
     ext = "txt"
 )]
-struct ForIndexTemplate {}
+struct ForIndexTemplate;
 
 #[test]
 fn test_for_index() {
-    let t = ForIndexTemplate {};
+    let t = ForIndexTemplate;
     assert_eq!(t.render().unwrap(), "45");
 }
+
+#[derive(Template)]
+#[template(
+    source = "{% for (i, j) in (0..10).zip(10..20).zip(30..40) %}{{ i.0 }} {{ i.1 }} {{ j }} {% endfor %}",
+    ext = "txt"
+)]
+struct ForZipRangesTemplate;
+
+#[test]
+fn test_for_zip_ranges() {
+    let t = ForZipRangesTemplate;
+    assert_eq!(
+        t.render().unwrap(),
+        "0 10 30 1 11 31 2 12 32 3 13 33 4 14 34 5 15 35 6 16 36 7 17 37 8 18 38 9 19 39 "
+    );
+}
Repository: djc/askama
Pull request #705 (2022-07-20 13:14:54)

Update to comrak v0.14
Closes #702.


Patch:
diff --git a/askama/Cargo.toml b/askama/Cargo.toml
index f580864..f421935 100644
--- a/askama/Cargo.toml
+++ b/askama/Cargo.toml
@@ -39,7 +39,7 @@ mime_guess = []
 [dependencies]
 askama_derive = { version = "0.12.0", path = "../askama_derive" }
 askama_escape = { version = "0.10.3", path = "../askama_escape" }
-comrak = { version = "0.13", optional = true, default-features = false }
+comrak = { version = "0.14", optional = true, default-features = false }
 dep_humansize = { package = "humansize", version = "1.1.0", optional = true }
 dep_num_traits = { package = "num-traits", version = "0.2.6", optional = true }
 percent-encoding = { version = "2.1.0", optional = true }
diff --git a/askama/src/filters/mod.rs b/askama/src/filters/mod.rs
index 4350d70..b9f1fc2 100644
--- a/askama/src/filters/mod.rs
+++ b/askama/src/filters/mod.rs
@@ -351,7 +351,7 @@ where
 {
     use comrak::{
         markdown_to_html, ComrakExtensionOptions, ComrakOptions, ComrakParseOptions,
-        ComrakRenderOptions,
+        ComrakRenderOptions, ListStyleType,
     };
 
     const DEFAULT_OPTIONS: ComrakOptions = ComrakOptions {
@@ -380,6 +380,7 @@ where
             hardbreaks: false,
             github_pre_lang: false,
             width: 0,
+            list_style: ListStyleType::Dash,
         },
     };
 
diff --git a/book/src/filters.md b/book/src/filters.md
index f8e30a7..ce1ff6e 100644
--- a/book/src/filters.md
+++ b/book/src/filters.md
@@ -374,7 +374,7 @@ Ugly: <script>var data = '{{data|json|safe}}';</script>
 [#markdown]: #markdown
 
 Enabling the `markdown` feature will enable the use of the `markdown` filter.
-This will render a value using a [GitHub flavored CommonMark](https://docs.rs/comrak/0.12.*/comrak/) syntax.
+This will render a value using a [GitHub flavored CommonMark](https://docs.rs/comrak/0.14.*/comrak/) syntax.
 By default the extensions “autolink”, “strikethrough”, “tagfilter”, and “table” are enabled.
 Any raw HTML gets escaped.
 


Test patch:
diff --git a/testing/Cargo.toml b/testing/Cargo.toml
index 77ab25e..3dac5e8 100644
--- a/testing/Cargo.toml
+++ b/testing/Cargo.toml
@@ -13,7 +13,7 @@ markdown = ["comrak", "askama/markdown"]
 
 [dependencies]
 askama = { path = "../askama", version = "0.11.0-beta.1" }
-comrak = { version = "0.13", default-features = false, optional = true }
+comrak = { version = "0.14", default-features = false, optional = true }
 serde_json = { version = "1.0", optional = true }
 
 [dev-dependencies]
Repository: djc/askama
Pull request #773 (2023-01-30 13:29:39)

Update comrak dependency to 0.16
Resolves #768.


Patch:
diff --git a/askama/Cargo.toml b/askama/Cargo.toml
index 7995969..95a2043 100644
--- a/askama/Cargo.toml
+++ b/askama/Cargo.toml
@@ -41,7 +41,7 @@ mime_guess = []
 [dependencies]
 askama_derive = { version = "0.12.0", path = "../askama_derive" }
 askama_escape = { version = "0.10.3", path = "../askama_escape" }
-comrak = { version = "0.15", optional = true, default-features = false }
+comrak = { version = "0.16", optional = true, default-features = false }
 dep_humansize = { package = "humansize", version = "2", optional = true }
 dep_num_traits = { package = "num-traits", version = "0.2.6", optional = true }
 percent-encoding = { version = "2.1.0", optional = true }
diff --git a/askama/src/filters/mod.rs b/askama/src/filters/mod.rs
index aed34a1..f76a463 100644
--- a/askama/src/filters/mod.rs
+++ b/askama/src/filters/mod.rs
@@ -374,6 +374,7 @@ where
             // default:
             smart: false,
             default_info_string: None,
+            relaxed_tasklist_matching: false,
         },
         render: ComrakRenderOptions {
             unsafe_: false,


Test patch:
diff --git a/testing/Cargo.toml b/testing/Cargo.toml
index e1f1bb4..c8326e8 100644
--- a/testing/Cargo.toml
+++ b/testing/Cargo.toml
@@ -14,7 +14,7 @@ markdown = ["comrak", "askama/markdown"]
 
 [dependencies]
 askama = { path = "../askama", version = "0.11.2" }
-comrak = { version = "0.15", default-features = false, optional = true }
+comrak = { version = "0.16", default-features = false, optional = true }
 serde_json = { version = "1.0", optional = true }
 
 [dev-dependencies]