Skip to content

Commit

Permalink
fix css parser binary
Browse files Browse the repository at this point in the history
  • Loading branch information
Sharktheone committed May 3, 2024
1 parent 0b26131 commit 3f34e33
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/bin/css3-parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,11 @@ fn main() -> Result<()> {
));
}
response.into_string()?
} else if url.starts_with("file://") {
let path = url.trim_start_matches("file://");
fs::read_to_string(path)?
} else {
// Get html from the file
fs::read_to_string(&url)?
bail!("Unsupported url scheme: {}", url);
};

if tokens {
Expand Down

0 comments on commit 3f34e33

Please sign in to comment.