diff --git a/ledit.asd b/ledit.asd index 2e2bee8..9fb740d 100644 --- a/ledit.asd +++ b/ledit.asd @@ -6,7 +6,7 @@ (in-package :cl-user) (defpackage :ledit-asd - (:use :cl :asdf)) + (:use :cl :asdf :assoc-utils)) (in-package :ledit-asd) diff --git a/resources/test-fragments/defun-fact.html b/resources/test-fragments/defun-fact.html index d6c9e39..6d44bee 100644 --- a/resources/test-fragments/defun-fact.html +++ b/resources/test-fragments/defun-fact.html @@ -1,6 +1,6 @@ -
+
defun fact
diff --git a/src/lisp/ledit.lisp b/src/lisp/ledit.lisp index f9ebe8a..e0765cd 100644 --- a/src/lisp/ledit.lisp +++ b/src/lisp/ledit.lisp @@ -4,4 +4,16 @@ (:use :cl :xmls)) (in-package :ledit) -;; blah blah blah. +(defun slurp (infile) + (with-open-file (instream infile :direction :input :if-does-not-exist nil) + (when instream + (let ((string (make-string (file-length instream)))) + (read-sequence string instream) + string)))) + +(defn html-to-lisp (markup) + (cond + ((stringp markup)(html-to-lisp (xmls:node->nodelist (xmls:parse markup)))) + (t + (let* + ((classes (cadr