Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ repository = "https://github.com/bounded-systems/git-ast"
[dependencies]
tree-sitter = "0.22"
tree-sitter-rust = "0.21"
tree-sitter-html = "0.20"
serde_json = "1"

# The Gherkin suite (tests/features/*.feature) executes the README's claims
Expand Down
3 changes: 2 additions & 1 deletion src/filters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
//! status line and the transformed content.

use crate::pktline::{self, Packet};
use crate::{json, printer, Error};
use crate::{html, json, printer, Error};
use std::collections::HashMap;
use std::io::{self, Read, Write};
use std::path::Path;
Expand Down Expand Up @@ -112,6 +112,7 @@ fn transform(command: &str, pathname: &str, content: &[u8]) -> Result<Vec<u8>, E
"clean" => match ext {
Some("rs") => printer::canonicalize(content),
Some("json") => json::canonicalize(content),
Some("html") | Some("htm") => html::canonicalize(content),
_ => Ok(content.to_vec()),
},
"smudge" => Ok(content.to_vec()),
Expand Down
Loading
Loading