Merge pull request #70 from hay-kot/feat/implement-copy-button
feat: add copy button to viewer
This commit is contained in:
commit
3e58ba325a
2 changed files with 48 additions and 6 deletions
|
@ -80,6 +80,10 @@ impl Pasta {
|
|||
pub fn content_not_highlighted(&self) -> String {
|
||||
html_highlight(&self.content, "txt")
|
||||
}
|
||||
|
||||
pub fn content_escaped(&self) -> String {
|
||||
self.content.replace("`", "\\`").replace("$", "\\$")
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for Pasta {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue