Skip to content

Commit

Permalink
Fix method export
Browse files Browse the repository at this point in the history
  • Loading branch information
huacnlee committed Jun 30, 2021
1 parent 3319c87 commit e61d1e8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,13 +222,13 @@ fn space_dash_with_hans(text: &str) -> String {
return out;
}

fn is_ignore_auto_correct(raw: &str) -> bool {
pub fn is_ignore_auto_correct(raw: &str) -> bool {
let re = Regex::new(r"autocorrect:([ ]*)(0|false)").unwrap();
return re.is_match(raw);
}

// get file extension from filepath
fn get_file_extension(filepath: &str) -> &str {
pub fn get_file_extension(filepath: &str) -> &str {
if let Some(ext) = Path::new(filepath).extension().and_then(OsStr::to_str) {
return ext;
}
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ fn format_and_output(path: &str, fix: bool) {

let raw = raw.as_str();

if (is_ignore_auto_correct(raw)) {
if is_ignore_auto_correct(raw) {
return;
}

Expand Down

0 comments on commit e61d1e8

Please sign in to comment.