Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename module #7

Merged
merged 1 commit into from
Jun 9, 2024
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
File renamed without changes.
18 changes: 9 additions & 9 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
mod fmt_md;
mod fmt_str;
mod output;
mod select;
mod tree;
mod tree_to_json;

use std::io;
use std::io::{stdin, Read};
use std::string::ToString;

use crate::fmt_json::TextOnly;
use crate::tree::MdqNode;
use crate::tree_to_json::TextOnly;

mod fmt_json;
mod fmt_md;
mod fmt_str;
mod output;
mod select;
mod tree;

fn main() {
let mut contents = String::new();
Expand All @@ -30,7 +30,7 @@ fn main() {

let found = selector.find(&mdq);

let jsons = tree_to_json::nodes_to_json::<_, TextOnly>(&found);
let jsons = fmt_json::nodes_to_json::<_, TextOnly>(&found);
println!("{}", jsons);
out.write_str("\n\n=======================================\n\n");
fmt_md::write_md(&mut out, &found);
Expand Down
4 changes: 2 additions & 2 deletions src/select.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::fmt_json;
use crate::tree::{CodeVariant, Inline, MdqNode};
use crate::tree_to_json;

#[allow(dead_code)]
pub enum Selector {
Expand Down Expand Up @@ -145,6 +145,6 @@ impl Selector {
}

fn line_to_string(line: &[Inline]) -> String {
tree_to_json::TextOnly::line_to_string(line)
fmt_json::TextOnly::line_to_string(line)
}
}