From 2ffbc58736d9796669a0ac779182e2e056501d3c Mon Sep 17 00:00:00 2001 From: Christian Mueller Date: Wed, 29 Jan 2014 20:30:13 +0100 Subject: [PATCH] title deriving improved --- src/NoteHub/api.clj | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/NoteHub/api.clj b/src/NoteHub/api.clj index 52af85c..3b35312 100644 --- a/src/NoteHub/api.clj +++ b/src/NoteHub/api.clj @@ -37,9 +37,8 @@ (print-str year month day title)) (defn derive-title [md-text] - (apply str - (remove #{\# \_ \*} - (first (split-lines md-text))))) + (sreplace (first (split-lines md-text)) + #"(#+|_|\*+|<.*?>)" "")) (defn get-date "Returns today's date"