# Gemini Code Review: askama-markdown-cmark

This document provides a summary of the `askama-markdown-cmark` project, generated by Gemini.

## Project Overview

`askama-markdown-cmark` is a Rust library that provides a filter for the Askama templating engine. This filter allows you to render Markdown text into HTML directly within your Askama templates. It uses the `pulldown-cmark` library for Markdown processing, which is a popular and efficient CommonMark parser.

The project is well-structured and follows standard Rust conventions. It is a small, focused library with a clear purpose.

## How to Use

To use the `markdown_cmark` filter in your Askama templates, you need to import the `filters` module from this crate and then apply the filter to your content.

Here is an example from the project's `README.md`:

```rust
use askama::Template;
use askama_markdown_cmark::filters;

#[derive(Template)]
#[template(source = "{{ content|markdown_cmark|safe }}", ext="html")]
struct Example<'a> {
    content: &'a str,
}

fn main() -> std::io::Result<()> {
    println!("{}", Example { content: "## Hello world\n\nTesting ~~x~~ **y** _z_\n" }.render().unwrap());
    Ok(())
}
```

The `|safe` filter is used to prevent the HTML output from being escaped by Askama.

## Codebase Summary

The codebase is contained within a single file: `src/lib.rs`.

The main component is the `markdown_cmark` function, which is decorated with `#[askama::filter_fn]`. This function takes a string slice as input, parses it using `pulldown-cmark`, and returns the rendered HTML as a `String`.

The project also includes a simple test case that verifies the basic functionality of the filter.

## Conclusion

`askama-markdown-cmark` is a useful and straightforward library for anyone who needs to render Markdown content within Askama templates. The code is clean, well-documented, and easy to understand.

