mirror of
https://github.com/loro-dev/loro.git
synced 2025-02-02 11:06:14 +00:00
fix: refine mermaid diagram style
This commit is contained in:
parent
d1e135ec30
commit
bb3eb7b7a0
3 changed files with 9 additions and 3 deletions
|
@ -192,6 +192,8 @@ pub(crate) trait Dag {
|
|||
iter_dag(self)
|
||||
}
|
||||
|
||||
/// You can visualize and generate img link at https://mermaid.live/
|
||||
#[inline]
|
||||
fn mermaid(&self) -> String
|
||||
where
|
||||
Self: Sized,
|
||||
|
|
|
@ -43,8 +43,12 @@ fn to_str(output: Output) -> String {
|
|||
|
||||
is_first = false;
|
||||
s += format!(
|
||||
"{}-{}(ctr: {}..{})",
|
||||
id_span.client_id, id_span.counter.from, id_span.counter.from, id_span.counter.to
|
||||
"{}-{}(\"c{}: [{}, {})\")",
|
||||
id_span.client_id,
|
||||
id_span.counter.from,
|
||||
id_span.client_id,
|
||||
id_span.counter.from,
|
||||
id_span.counter.to
|
||||
)
|
||||
.as_str();
|
||||
}
|
||||
|
|
|
@ -473,7 +473,7 @@ mod find_common_ancestors {
|
|||
);
|
||||
}
|
||||
|
||||
/// ![](https://i.ibb.co/C5xLG53/image.png)
|
||||
/// ![](https://mermaid.ink/img/pako:eNqNkTFPwzAQhf_K6SYqOZJ9CYsHJroxwYgXY7skInEq1xFCVf87jg5XVQQSnk6fz_feO5_RzT6gxsM4f7repgzPTyZCOafl7T3ZYw9uHELMkqls2juDTmp4bQV0O4M7aJqHwqlyEtDecFW5EkA3XFYuBaiVs0CInotfXSimqunW16q87gTcX6cqdqe27hSrKVZr_6tGTImn0nYqcWbaZiZWI1ajP9WK2zqnClFd5jVn3SIKnEKa7ODLb53Xa4O5D1MwqEvpbfowaOKl9C1Hb3PY-yHPCfXBjqcg0C55fvmKDnVOS6hNj4Mtgaefrss3dp6HFg)
|
||||
#[test]
|
||||
fn large_lamport_with_longer_path() {
|
||||
let mut a0 = TestDag::new(0);
|
||||
|
|
Loading…
Reference in a new issue