mirror of
https://github.com/lise-henry/crowbook
synced 2024-05-24 14:16:04 +02:00
Remove test_view example, don't include the text_view module in non-proofread build
This commit is contained in:
parent
e78b96212f
commit
b6f2c2fb8c
|
@ -1,22 +0,0 @@
|
|||
extern crate crowbook;
|
||||
use crowbook::{view_as_text, insert_annotation};
|
||||
use crowbook::Parser;
|
||||
use crowbook::Data;
|
||||
|
||||
fn main() {
|
||||
let s = "Un **petit** test avec du *formatage*";
|
||||
|
||||
let mut ast = Parser::new().parse(s).unwrap();
|
||||
println!("{:?}", ast);
|
||||
println!("{}", view_as_text(&ast));
|
||||
insert_annotation(&mut ast, &Data::GrammarError("foo".to_owned()), 2, 1);
|
||||
insert_annotation(&mut ast, &Data::GrammarError("?".to_owned()), 3, 2);
|
||||
insert_annotation(&mut ast, &Data::GrammarError("!".to_owned()), 0, 10);
|
||||
// insert_annotation(&mut ast, "??", 3, 2);
|
||||
// insert_annotation(&mut ast, "??", 0, 10);
|
||||
|
||||
// insert_at(&mut ast, "(2)", 2);
|
||||
// insert_at(&mut ast, "(3)", 3);
|
||||
// insert_at(&mut ast, "(4s)", 4);
|
||||
println!("{:?}", ast);
|
||||
}
|
|
@ -123,6 +123,7 @@ pub use latex::LatexRenderer;
|
|||
pub use odt::OdtRenderer;
|
||||
pub use error::{Result, Error, Source};
|
||||
pub use token::Token;
|
||||
pub use token::Data;
|
||||
pub use number::Number;
|
||||
pub use resource_handler::ResourceHandler;
|
||||
pub use logger::{Logger, InfoLevel};
|
||||
|
@ -155,15 +156,11 @@ mod toc;
|
|||
mod zipper;
|
||||
mod templates;
|
||||
mod bookoption;
|
||||
mod text_view;
|
||||
|
||||
#[cfg(feature = "proofread")]
|
||||
mod grammar_check;
|
||||
|
||||
pub use token::Data;
|
||||
pub use text_view::view_as_text;
|
||||
//pub use text_view::insert_at;
|
||||
pub use text_view::insert_annotation;
|
||||
#[cfg(feature = "proofread")]
|
||||
mod text_view;
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
|
Loading…
Reference in New Issue