Args: implement upload arg

Signed-off-by: Gunwant Jain <mail@wantguns.dev>
This commit is contained in:
Gunwant Jain
2022-01-18 15:48:21 +05:30
parent 6961ed59b4
commit ce001c6a79
6 changed files with 27 additions and 20 deletions

View File

@@ -1,10 +1,11 @@
use std::fs;
use std::path::PathBuf;
use syntect::highlighting::ThemeSet;
use syntect::html::highlighted_html_for_string;
use syntect::parsing::SyntaxSet;
pub fn get_pretty_body(path: &String, ext: &String) -> String {
pub fn get_pretty_body(path: &PathBuf, ext: &String) -> String {
let ss = SyntaxSet::load_defaults_newlines();
let mut theme_cursor = std::io::Cursor::new(include_bytes!("../../themes/ayu_dark.tmTheme"));