Merge pull request #357 from whatacold/support-percentage-width

Fix #356: support width and height in percentage.
This commit is contained in:
Yujie Wen 2019-06-11 00:02:07 +08:00 committed by GitHub
commit 29588ebf26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -664,11 +664,15 @@ overview: %s,
;; slide width
(let ((width (plist-get info :reveal-width)))
(if (> width 0) (format "width: %d,\n" width) ""))
(cond ((and (integerp width) (> width 0)) (format "width: %d,\n" width))
((stringp width) (format "width: '%s',\n" width))
(t "")))
;; slide height
(let ((height (plist-get info :reveal-height)))
(if (> height 0) (format "height: %d,\n" height) ""))
(cond ((and (integerp height) (> height 0)) (format "height: %d,\n" height))
((stringp height) (format "height: '%s',\n" height))
(t "")))
;; slide margin
(let ((margin (string-to-number (plist-get info :reveal-margin))))