mirror of
https://github.com/YGGverse/ggemtext.git
synced 2026-04-01 01:25:34 +00:00
remove middle-level code api, update comments
This commit is contained in:
parent
d739181a76
commit
84c72ae3a3
9 changed files with 13 additions and 57 deletions
|
|
@ -1,33 +1,5 @@
|
|||
pub mod error;
|
||||
pub mod inline;
|
||||
pub mod multiline;
|
||||
|
||||
pub use error::Error;
|
||||
use inline::Inline;
|
||||
use multiline::Multiline;
|
||||
|
||||
pub struct Code {
|
||||
// nothing yet..
|
||||
}
|
||||
|
||||
impl Code {
|
||||
// Constructors
|
||||
|
||||
/// Parse inline `Self` from string
|
||||
pub fn inline_from(line: &str) -> Option<Inline> {
|
||||
Inline::from(line)
|
||||
}
|
||||
|
||||
/// Begin multi-line parse `Self` from string
|
||||
pub fn multiline_begin_from(line: &str) -> Option<Multiline> {
|
||||
Multiline::begin_from(line)
|
||||
}
|
||||
|
||||
/// Continue multi-line parse `Self` from string
|
||||
pub fn multiline_continue_from(this: &mut Multiline, line: &str) -> Result<(), Error> {
|
||||
match Multiline::continue_from(this, line) {
|
||||
Ok(()) => Ok(()),
|
||||
Err(e) => Err(Error::Multiline(e)),
|
||||
}
|
||||
}
|
||||
}
|
||||
pub use inline::Inline;
|
||||
pub use multiline::Multiline;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue