Added support for strong and emphasis
This commit is contained in:
parent
75500d8149
commit
172973926d
|
@ -1,4 +1,4 @@
|
||||||
;;; md4tj_parse --- Summary
|
f;;; md4tj_parse --- Summary
|
||||||
|
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
|
|
||||||
|
@ -32,6 +32,18 @@
|
||||||
"Process LINE that is paragraph, return HTML."
|
"Process LINE that is paragraph, return HTML."
|
||||||
(concat (md4tj-begin-tag "p") line (md4tj-end-tag "p")))
|
(concat (md4tj-begin-tag "p") line (md4tj-end-tag "p")))
|
||||||
|
|
||||||
|
(defun md4tj-process-line (line)
|
||||||
|
"Process all inline elements of the LINE, return HTML."
|
||||||
|
(replace-regexp-in-string
|
||||||
|
"\\*\\(.*\\)\\*"
|
||||||
|
"<em>\\1</em>"
|
||||||
|
(replace-regexp-in-string
|
||||||
|
"\\*\\*\\(.*\\)\\*\\*"
|
||||||
|
"<strong>\\1</strong>"
|
||||||
|
(replace-regexp-in-string
|
||||||
|
"`\\(.*\\)`"
|
||||||
|
"<code>\\1</code>" line))))
|
||||||
|
|
||||||
;; Note: a "block" is the smallest unit of parsing
|
;; Note: a "block" is the smallest unit of parsing
|
||||||
;; It is normally a line of the code, but can be
|
;; It is normally a line of the code, but can be
|
||||||
;; multiple lines in the case of a block (NI)
|
;; multiple lines in the case of a block (NI)
|
||||||
|
|
Loading…
Reference in New Issue