   ([s]
    (str->chars s :white :black))
   ([s fg bg]
-   (map (fn [c] {:c c :fg fg :bg bg :style #{}})
+   (str->chars s fg bg #{}))
+  ([s fg bg style]
+   (map (fn [c] {:c c :fg fg :bg bg :style style})
         s)))
 
 (defn markup->chars
-  [x y s]
-  (let [z (zip-str (str "<body>" s "</body>"))]
-    (println "s" s)
-    (map-indexed (fn [idx c] (assoc c :c  (str (get c :c))
-                                      :x  (+ x idx)
-                                      :y  y
-                                      :fg (color->rgb (get c :fg))
-                                      :bg (color->rgb (get c :bg))))
-                 (reduce (fn [characters v]
-                           (cond
-                             (string? v)
-                               (concat characters
-                                       (str->chars v))
-                             (map? v)
-                               (concat characters
-                                       (str->chars (-> v :content first)
-                                                   (if (= (get v :tag) :color)
-                                                     (keyword (get-in v [:attrs :fg] :white))
-                                                     :white)
-                                                   (if (= (get v :tag) :color)
-                                                     (keyword (get-in v [:attrs :bg] :black))
-                                                     :black)))))
-                         []
-                         (-> z zip/node :content)))))
+  ([x y s]
+   (markup->chars x y s :white :black))
+  ([x y s fg bg]
+   (markup->chars x y s fg bg #{}))
+  ([x y s fg bg style]
+   (if (re-find #"^\s*$" s)
+     (map (fn [idx] {:c     " "
+                     :x     (+ x idx)
+                     :y     y
+                     :fg    (color->rgb fg)
+                     :bg    (color->rgb bg)
+                     :style style})
+          (range (count s)))
+     (let [body    (str "<body>" s "</body>")
+           z       (zip-str body)
+           content (-> z zip/node :content)
+           characters
+       (map-indexed (fn [idx c] (assoc c :c     (str (get c :c))
+                                         :x     (+ x idx)
+                                         :y     y
+                                         :fg    (color->rgb (get c :fg))
+                                         :bg    (color->rgb (get c :bg))
+                                         :style style))
+                    (reduce (fn [characters v]
+                              (cond
+                                (string? v)
+                                  (concat characters
+                                          (str->chars v fg bg style))
+                                (map? v)
+                                  (concat characters
+                                          (str->chars (-> v :content first)
+                                                      (if (= (get v :tag) :color)
+                                                        (keyword (get-in v [:attrs :fg] fg))
+                                                        fg)
+                                                      (if (= (get v :tag) :color)
+                                                        (keyword (get-in v [:attrs :bg] bg))
+                                                        bg)))))
+                            []
+                            content))]
+      characters))))
 
 (defn put-string
   ([^robinson.aterminal.ATerminal screen x y string]


(defn left-justify-text [s width]
  (let [n-ws (- width (count s))]
   (apply str (concat s (repeat n-ws " ")))))

(defn render-line

  ([screen title selected-hotkeys items x y width height {:keys [use-applicable center border center-title]
                                                          :or {:use-applicable false :border false :center false :center-title false}}]
   ;; items is list of {:s "string" :fg :black :bg :white}
   (let [items    (map (fn [item] {:s (format #?(:clj  "<color fg=\"highlight\">%c</color>%c%s%s %s %s"
                                                 :cljs "<color fg=\"highlight\">%s</color>%s%s%s %s %s")
                                              (or (item :hotkey)
                                                  \ )
                                              (if (contains? selected-hotkeys (item :hotkey))
