   ([commentDict]
    (doall (for [filepath (get-all-files)
                 :when (not (.isDirectory (io/file filepath)))
-                :let [mark (get commentDict (re-find #"(?<=\w)\..*$" filepath))]
+                :let [mark (get commentDict (re-find #"(?<=\w)\.\w+$" filepath))]
                 :when mark]
             (conj (read-comments-in-file filepath mark)
                   filepath))))
   ([commentDict root]
    (doall (for [filepath (get-all-files root)
                 :when (not (.isDirectory (io/file filepath)))
-                :let [mark (get commentDict (re-find #"(?<=\w)\..*$" filepath))]
+                :let [mark (get commentDict (re-find #"(?<=\w)\.\w+$" filepath))]
                 :when mark]
             (conj (read-comments-in-file filepath mark)
                   filepath))))


(defn read-json
  ([]
   (json/read-str (slurp "./src/codeitlater/comments.json")))
  ([path]
   (json/read-str (slurp "path/comments.json"))))


;; This regex expression get help from: https://stackoverflow.com/questions/45848999/clojure-regex-delete-whitespace-in-pattern

                  :when (not (.isDirectory (io/file filepath)))
                  typepattern typepatterns
                  :when (re-matches (first typepattern) filepath)
                  :let [mark (get commentDict (re-find #"(?<=\w)\.\w+$" filepath))]
                  :when mark]
              (conj (read-comments-in-file filepath (get commentDict (last typepattern)))
                    filepath))))))
