Added support for strong and emphasis

This commit is contained in:
j4nk 2022-12-28 15:02:19 -05:00
parent 75500d8149
commit 172973926d
1 changed files with 13 additions and 1 deletions

View File

@ -1,4 +1,4 @@
;;; md4tj_parse --- Summary
f;;; md4tj_parse --- Summary
;;; Commentary:
@ -32,6 +32,18 @@
"Process LINE that is paragraph, return HTML."
(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
;; It is normally a line of the code, but can be
;; multiple lines in the case of a block (NI)