Make Oblique no longer a context, add a point module
This commit is contained in:
parent
de5b3dd377
commit
315956e20d
4 changed files with 58 additions and 20 deletions
|
|
@ -9,9 +9,15 @@ use crate::syntax::content::parser::{
|
|||
pub struct State {
|
||||
pub context: Context,
|
||||
pub dom_ids: HashMap<String, Vec<String>>,
|
||||
pub switches: Switches,
|
||||
pub buffers: Buffers,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct Switches {
|
||||
pub oblique: bool,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct Buffers {
|
||||
pub anchor: AnchorBuffer,
|
||||
|
|
@ -56,14 +62,15 @@ impl std::fmt::Display for AnchorBuffer {
|
|||
}
|
||||
}
|
||||
|
||||
impl State {
|
||||
pub fn new() -> State {
|
||||
impl Default for State {
|
||||
fn default() -> State {
|
||||
State {
|
||||
context: Context {
|
||||
inline: Inline::None,
|
||||
block: Block::None,
|
||||
},
|
||||
dom_ids: HashMap::new(),
|
||||
switches: Switches { oblique: false },
|
||||
buffers: Buffers {
|
||||
anchor: AnchorBuffer {
|
||||
candidate: Anchor::default(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue