[add] markdown: <theme>, <hue>, <sat>, <lit>

This commit is contained in:
hkau 2024-03-31 19:40:23 -04:00
parent ba8cc7e998
commit 0404b38ca1
2 changed files with 13 additions and 1 deletions

View File

@ -68,6 +68,18 @@ pub async fn render_markdown(http_client: Client, input: String, paw: Paw) -> Op
body = body.replace("&lt;style&gt;", "<style>");
body = body.replace("&lt;/style&gt;", "</style>");
body = body.replace("&lt;theme&gt;", "<theme>");
body = body.replace("&lt;/theme&gt;", "</theme>");
body = body.replace("&lt;hue&gt;", "<hue>");
body = body.replace("&lt;/hue&gt;", "</hue>");
body = body.replace("&lt;sat&gt;", "<sat>");
body = body.replace("&lt;/sat&gt;", "</sat>");
body = body.replace("&lt;lit&gt;", "<lit>");
body = body.replace("&lt;/lit&gt;", "</lit>");
// rewrite links
body = body.replace(&paw.target, &format!("/{}", paw.name));

View File

@ -77,7 +77,7 @@
Save
</button>
<a href="/" class="border button round">Cancel</a>
<a href="/{{ name }}" class="border button round">Cancel</a>
</div>
<a href="javascript:" id="delete-btn" class="button round red">Delete</a>