<commit_before>(ns clj-highlight.output.html
  (:use clj-highlight.mangler clj-highlight.output.hiccup))


(defn span [c content]
  (str "<span class='" c "'>" (escape-html content) "</span>"))

(defn html-to-stream [stream root-class style-map tokenstream]
  (binding [*out* stream]
    (print (str "<span class='" root-class "'>"))
    (loop [[kind token & _] (first tokenstream) tkns (next tokenstream)]
      (let [style (get style-map kind (name kind))]
	(print (span style token))
	(if-let [[f & n] (next tokenstream)]
	  (recur f n))))
    (print "</span>")))

*<commit_msg>Removed orphan * in html.clj<commit_after>(ns clj-highlight.output.html
  (:use clj-highlight.mangler clj-highlight.output.hiccup))


(defn span [c content]
  (str "<span class='" c "'>" (escape-html content) "</span>"))

(defn html-to-stream [stream root-class style-map tokenstream]
  (binding [*out* stream]
    (print (str "<span class='" root-class "'>"))
    (loop [[kind token & _] (first tokenstream) tkns (next tokenstream)]
      (let [style (get style-map kind (name kind))]
	(print (span style token))
	(if-let [[f & n] (next tokenstream)]
	  (recur f n))))
    (print "</span>")))
{'fraction_non_alphanumeric': 0.1899488926746167, 'fraction_numerical': 0.0, 'mean_word_length': 4.021367521367521, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4533631', 'n_tokens_mistral': 429, 'n_tokens_neox': 413, 'n_words': 121}