Skip to content

Commit 7d63f94

Browse files
authored
[Update] update lib document (#30)
1 parent 131faaf commit 7d63f94

File tree

1 file changed

+14
-17
lines changed

1 file changed

+14
-17
lines changed

core/src/lib.rs

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,25 @@
11
//! CodeSnap is a tool to generate beautiful snapshots of your code snippets. It's a pure Rust library
22
//! that provides a simple API to create snapshots of code snippets with syntax highlighting, line
3-
//! numbers, and custom themes.
3+
//! numbers, code theme and more.
44
//!
5-
//! # Quick start
5+
//! ## Quick start
66
//!
77
//! ```rust
88
//! CodeSnap::default()
9-
//! .code(
10-
//! CodeBuilder::default()
11-
//! .language("rust")
12-
//! .content(CODE_SNIPPET)
13-
//! .build()?,
14-
//! )
15-
//! .watermark(WatermarkBuilder::default().content("CodeSnap").build()?)
16-
//! .build()?
17-
//! .create_snapshot()?
18-
//! .copy()
9+
//! .code(
10+
//! CodeBuilder::default()
11+
//! .language("haskell")
12+
//! .content(r#"print "Hello, CodeSnap!""#)
13+
//! .build()?,
14+
//! )
15+
//! .watermark(WatermarkBuilder::default().content("YYM").build()?)
16+
//! .build()?
17+
//! .create_snapshot()?
18+
//! .raw_data()?
19+
//! .copy()?;
1920
//! ```
2021
//!
21-
//! Now try to paste the code snapshot to your friends!
22-
//!
23-
//! /\_/\
24-
//! ( -.- ) If you enjoy CodeSnap, also try [Silicon](https://github.com/Aloxaf/silicon)
25-
//!
22+
//! Now try to paste the code snapshot to your friends! (Don't forget tell him that this was generated by CodeSnap! ^ ^)
2623
2724
mod components;
2825
pub mod config;

0 commit comments

Comments
 (0)