Added video capability with !!
This commit is contained in:
parent
114337d8b4
commit
f81885106c
|
@ -0,0 +1,2 @@
|
|||
all:
|
||||
emacs --no-site-file --batch -l ./md4tj_parse.el --eval "(md4tj-parse \"test_file.md4tj\" \"test_file.html\")"
|
|
@ -43,6 +43,10 @@
|
|||
(replace-regexp-in-string
|
||||
"!\\[\\([^\\[]*\\)](\\([^\\[]*\\))"
|
||||
(md4tj-begin-tag "img" (list '("src" "\\2") '("alt" "\\1")))
|
||||
;; Then videos
|
||||
(replace-regexp-in-string
|
||||
"!!\\[\\([^\\[]*\\)](\\([^\\[]*\\))"
|
||||
(concat (md4tj-begin-tag "video" (list '("src" "\\2") '("type" "video/webm"))) "\\1" (md4tj-end-tag "video"))
|
||||
;; Then emphasis
|
||||
(replace-regexp-in-string
|
||||
"\\*\\(.*\\)\\*"
|
||||
|
@ -54,7 +58,7 @@
|
|||
;; First code
|
||||
(replace-regexp-in-string
|
||||
"`\\(.*\\)`"
|
||||
"<code>\\1</code>" line))))))
|
||||
"<code>\\1</code>" line)))))))
|
||||
|
||||
(defun md4tj-clean-multiline (line)
|
||||
"Clean LINE of markdown syntax for ul."
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
<html lang="en-us">
|
||||
<head>
|
||||
|
||||
<link rel="stylesheet" href="test_css.css">
|
||||
<title>Test webpage</title>
|
||||
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
|
@ -11,7 +10,6 @@
|
|||
<body>
|
||||
|
||||
|
||||
|
||||
<h1>Hello <code>world</code>!</h1>
|
||||
<h2>Hello world!</h2>
|
||||
<h3>Hello world!</h3>
|
||||
|
@ -22,6 +20,7 @@
|
|||
<br/>
|
||||
<p><a href="https://example.com">Example website</a></p>
|
||||
<p><img src="usbs.png" alt="Example image"></p>
|
||||
<p><video src="test_video.webm" type="video/webm">Example video</video></p>
|
||||
<br/>
|
||||
<ul>
|
||||
<li><p>unordered item 1</p></li>
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
@@META charset UTF-8
|
||||
@@META name viewport content width=device-width,initial-scale=1.0
|
||||
@@TITLE Test webpage
|
||||
@@CSS test_css.css
|
||||
# Hello `world`!
|
||||
## Hello world!
|
||||
### Hello world!
|
||||
|
@ -11,6 +10,7 @@
|
|||
|
||||
[Example website](https://example.com)
|
||||
![Example image](usbs.png)
|
||||
!![Example video](test_video.webm)
|
||||
|
||||
- unordered item 1
|
||||
- unordered item 2
|
||||
|
|
Loading…
Reference in New Issue