Skip to content

Commit

Permalink
Merge commit '4f80167fe5ba271f489025c7c0625bd33c9cb21f'
Browse files Browse the repository at this point in the history
  • Loading branch information
jgardona committed Jan 9, 2024
2 parents 785b0c3 + 4f80167 commit 21ae84e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
32 changes: 16 additions & 16 deletions examples/styles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(())
Expand Down

0 comments on commit 21ae84e

Please sign in to comment.