From 2ceec3afd3bc4a32216039d84c9b5f28401d4356 Mon Sep 17 00:00:00 2001 From: Chielo Newctle Date: Sun, 15 Oct 2023 11:45:46 +0800 Subject: [PATCH] chore(readme): use mermaid for the diagram --- README.md | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e84ff04..4529a90 100644 --- a/README.md +++ b/README.md @@ -7,12 +7,29 @@ A general suffix automaton implementation in Rust. Python bindings and some utilities are also available. Please check out [`general-sam-py`](https://github.com/ModelTC/general-sam-py). -| [![the suffix automaton of abcbc][sam-of-abcbc]][sam-oi-wiki] | -| :----------------------------------------------------------------------------: | -| The suffix automaton of abcbc, image from [后缀自动机 - OI Wiki][sam-oi-wiki]. | +```mermaid +flowchart LR + init((ε)) + a((a)) + b((b)) + ab((ab)) + bc(((bc))) + abc((abc)) + abcb((abcb)) + abcbc(((abcbc))) + + init -- a --> a + init -- b --> b + a -- b --> ab + b -- c --> bc + init -- c --> bc + ab -- c --> abc + bc -- b --> abcb + abc -- b --> abcb + abcb -- c --> abcbc +``` -[sam-of-abcbc]: https://oi-wiki.org/string/images/SAM/SA_suffix_links.svg -[sam-oi-wiki]: https://oi-wiki.org/string/sam/ +> The suffix automaton of abcbc. ## Examples