diff --git a/src/main/clj/org/domaindrivenarchitecture/activity_pub_poc/parser.clj b/src/main/clj/org/domaindrivenarchitecture/activity_pub_poc/parser.clj index cb260b1..b1fff6a 100644 --- a/src/main/clj/org/domaindrivenarchitecture/activity_pub_poc/parser.clj +++ b/src/main/clj/org/domaindrivenarchitecture/activity_pub_poc/parser.clj @@ -6,15 +6,26 @@ ; pre-format (defn delete-comments-and-newlines [resource-file] - (apply str + (str/join "\n" (remove #(or (re-matches #"^#.*" %) (re-matches #"" %)) (str/split-lines (slurp resource-file))))) ; find definitions +; find definitions algo +; walk through list +; check the current element +; does it have a dot at the end? +; yes +; put it in the current list +; if this does not exist, create it +; the next element goes into a new list +; +; no +; put it in the current list (defn find-definitions [string-input] - (str/split string-input #" \.")) ;ToDo this is crap, splits need tbd differently + (str/split string-input #"\.\n|\.$")) ; make list of vectors/map from well known input-string