diff --git a/md4tj_parse.el b/md4tj_parse.el
index 982ee6c..eb3a668 100644
--- a/md4tj_parse.el
+++ b/md4tj_parse.el
@@ -73,31 +73,32 @@
(defun md4tj-convert-line-to-html (line state)
"Process LINE with STATE and return html."
(let ((cleanline (md4tj-clean-multiline line)))
- (concat
- ;; Beginning of multiline block
- (cond ((eq state 'beginul) "
\n- ")
- ((eq state 'beginol) "
\n- ")
- ((eq state 'begincode) "
\n")
- ((eq state 'ul) "- ")
- ((eq state 'ol) "
- ")
- ((eq state 'code) "")
- ((eq state 'endul) "
\n")
- ((eq state 'endol) "\n")
- ((eq state 'endcode) "\n\n")
- (t ""))
-
- ;; Body
- (cond ((or (eq state 'code) (eq state 'begincode)) (md4tj-clean-code-for-html cleanline))
- ((string-match "^#+ " cleanline) (md4tj-process-header (md4tj-process-line cleanline)))
- ((string= "---" cleanline) "
") ;; horizontal line
- ((= (length cleanline) 0) "
") ;; blank line
- (t (md4tj-process-paragraph (md4tj-process-line cleanline))))
-
- ;; End of multiline block
- (cond ((or (eq state 'ul) (eq state 'beginul)) "")
- ((or (eq state 'ol) (eq state 'beginol)) "")
- ((eq state 'code) "")
- (t "")))))
+ (if (string-match "^@@" line) "" ;; Don't process if @@ statement
+ (concat
+ ;; Beginning of multiline block
+ (cond ((eq state 'beginul) "\n- ")
+ ((eq state 'beginol) "
\n- ")
+ ((eq state 'begincode) "
\n")
+ ((eq state 'ul) "- ")
+ ((eq state 'ol) "
- ")
+ ((eq state 'code) "")
+ ((eq state 'endul) "
\n")
+ ((eq state 'endol) "\n")
+ ((eq state 'endcode) "\n\n")
+ (t ""))
+
+ ;; Body
+ (cond ((or (eq state 'code) (eq state 'begincode)) (md4tj-clean-code-for-html cleanline))
+ ((string-match "^#+ " cleanline) (md4tj-process-header (md4tj-process-line cleanline)))
+ ((string= "---" cleanline) "
") ;; horizontal line
+ ((= (length cleanline) 0) "
") ;; blank line
+ (t (md4tj-process-paragraph (md4tj-process-line cleanline))))
+
+ ;; End of multiline block
+ (cond ((or (eq state 'ul) (eq state 'beginul)) "")
+ ((or (eq state 'ol) (eq state 'beginol)) "")
+ ((eq state 'code) "")
+ (t ""))))))
(defun md4tj-next-state (currline prevstate)
"Return the state based on CURRLINE and PREVSTATE."
@@ -112,6 +113,11 @@
((and (string-match "```$" currline) (or (eq prevstate 'code) (eq prevstate 'begincode))) 'endcode)
(t 'normal)))
+(defun md4tj-begin ()
+ "Insert beginning code for all html."
+ (concat "\n"
+ (md4tj-begin-tag "html" (list (list "lang" "en-us"))) "\n"))
+
(defun md4tj-finalize (state)
"Finalizes HTML document by inserting missing end tags based on STATE."
(concat
@@ -122,6 +128,37 @@
"