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
|
(replace-regexp-in-string
|
||||||
"!\\[\\([^\\[]*\\)](\\([^\\[]*\\))"
|
"!\\[\\([^\\[]*\\)](\\([^\\[]*\\))"
|
||||||
(md4tj-begin-tag "img" (list '("src" "\\2") '("alt" "\\1")))
|
(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
|
;; Then emphasis
|
||||||
(replace-regexp-in-string
|
(replace-regexp-in-string
|
||||||
"\\*\\(.*\\)\\*"
|
"\\*\\(.*\\)\\*"
|
||||||
|
@ -54,7 +58,7 @@
|
||||||
;; First code
|
;; First code
|
||||||
(replace-regexp-in-string
|
(replace-regexp-in-string
|
||||||
"`\\(.*\\)`"
|
"`\\(.*\\)`"
|
||||||
"<code>\\1</code>" line))))))
|
"<code>\\1</code>" line)))))))
|
||||||
|
|
||||||
(defun md4tj-clean-multiline (line)
|
(defun md4tj-clean-multiline (line)
|
||||||
"Clean LINE of markdown syntax for ul."
|
"Clean LINE of markdown syntax for ul."
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
<html lang="en-us">
|
<html lang="en-us">
|
||||||
<head>
|
<head>
|
||||||
|
|
||||||
<link rel="stylesheet" href="test_css.css">
|
|
||||||
<title>Test webpage</title>
|
<title>Test webpage</title>
|
||||||
|
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||||
|
@ -11,7 +10,6 @@
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h1>Hello <code>world</code>!</h1>
|
<h1>Hello <code>world</code>!</h1>
|
||||||
<h2>Hello world!</h2>
|
<h2>Hello world!</h2>
|
||||||
<h3>Hello world!</h3>
|
<h3>Hello world!</h3>
|
||||||
|
@ -22,6 +20,7 @@
|
||||||
<br/>
|
<br/>
|
||||||
<p><a href="https://example.com">Example website</a></p>
|
<p><a href="https://example.com">Example website</a></p>
|
||||||
<p><img src="usbs.png" alt="Example image"></p>
|
<p><img src="usbs.png" alt="Example image"></p>
|
||||||
|
<p><video src="test_video.webm" type="video/webm">Example video</video></p>
|
||||||
<br/>
|
<br/>
|
||||||
<ul>
|
<ul>
|
||||||
<li><p>unordered item 1</p></li>
|
<li><p>unordered item 1</p></li>
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
@@META charset UTF-8
|
@@META charset UTF-8
|
||||||
@@META name viewport content width=device-width,initial-scale=1.0
|
@@META name viewport content width=device-width,initial-scale=1.0
|
||||||
@@TITLE Test webpage
|
@@TITLE Test webpage
|
||||||
@@CSS test_css.css
|
|
||||||
# Hello `world`!
|
# Hello `world`!
|
||||||
## Hello world!
|
## Hello world!
|
||||||
### Hello world!
|
### Hello world!
|
||||||
|
@ -11,6 +10,7 @@
|
||||||
|
|
||||||
[Example website](https://example.com)
|
[Example website](https://example.com)
|
||||||
![Example image](usbs.png)
|
![Example image](usbs.png)
|
||||||
|
!![Example video](test_video.webm)
|
||||||
|
|
||||||
- unordered item 1
|
- unordered item 1
|
||||||
- unordered item 2
|
- unordered item 2
|
||||||
|
|
Loading…
Reference in New Issue