diff --git a/Cargo.toml b/Cargo.toml index 3cd61df..7a9e2c9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ansistream" -version = "0.1.2" +version = "0.1.3" edition = "2021" repository = "https://github.com/jgardona/ansistream" homepage = "https://github.com/jgardona/ansistream" diff --git a/examples/styles.rs b/examples/styles.rs index f67d217..9791c20 100644 --- a/examples/styles.rs +++ b/examples/styles.rs @@ -13,41 +13,41 @@ fn main() -> io::Result<()> { astream.write_string("This example will print text styles. Will depend on terminal emulator specs:\n\n")?; astream.write_attribute(TS_BOLD)?; astream.write_string("This is a bold styled text\n")?; - astream.reset_attribute(TS_BOLD)?; + astream.reset_all_attributes()?; - astream.write_attribute(TS_ITALIC)?; // not working today? + astream.write_attribute(TS_ITALIC)?; astream.write_string("This is a italic styled text\n")?; - astream.reset_attribute(TS_ITALIC)?; + astream.reset_all_attributes()?; astream.write_attribute(TS_DIM)?; astream.write_string("This is a dim styled text\n")?; - astream.reset_attribute(TS_DIM)?; + astream.reset_all_attributes()?; - astream.write_attribute(TS_INVERT)?; // not working today? + astream.write_attribute(TS_INVERT)?; astream.write_string("This is a invert styled text")?; - astream.reset_attribute(TS_INVERT)?; + astream.reset_all_attributes()?; writeln!(&mut *astream)?; writeln!(&mut *astream)?; - astream.write_attribute(TS_OVERLINE)?; // not working today? + astream.write_attribute(TS_OVERLINE)?; astream.write_string("This is a overline styled text\n")?; - astream.reset_attribute(TS_OVERLINE)?; + astream.reset_all_attributes()?; - astream.write_attribute(TS_UNDERLINE)?; // not working today? + astream.write_attribute(TS_UNDERLINE)?; astream.write_string("This is a underline styled text\n")?; - astream.reset_attribute(TS_UNDERLINE)?; + astream.reset_all_attributes()?; - astream.write_attribute(TS_HIDDEN)?; // not working today? + astream.write_attribute(TS_HIDDEN)?; astream.write_string("This is a hidden styled text\n")?; - astream.reset_attribute(TS_HIDDEN)?; + astream.reset_all_attributes()?; - astream.write_attribute(TS_BLINK)?; // not working today? + astream.write_attribute(TS_BLINK)?; astream.write_string("This is a blink styled text\n")?; - astream.reset_attribute(TS_BLINK)?; + astream.reset_all_attributes()?; - astream.write_attribute(TS_STRIKE)?; // not working today? + astream.write_attribute(TS_STRIKE)?; astream.write_string("This is a strike styled text\n")?; - astream.reset_attribute(TS_STRIKE)?; + astream.reset_all_attributes()?; flush(&mut *astream)?; Ok(())