File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
src/resources/extensions/quarto/lipsum Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,14 @@ local barePattern = '^(%d+)$'
36
36
return {
37
37
[' lipsum' ] = function (args , kwargs , meta )
38
38
39
+ local isRandom = false
40
+ if kwargs and kwargs [" random" ] then
41
+ local randomVal = pandoc .utils .stringify (kwargs [" random" ])
42
+ if randomVal == " true" then
43
+ isRandom = true
44
+ end
45
+ end
46
+
39
47
local paraStart = 1
40
48
local paraEnd = 5
41
49
@@ -58,7 +66,9 @@ return {
58
66
-- a number of paragraphs is specified, like 10
59
67
local _ ,_ ,bareVal = range :find (barePattern )
60
68
if bareVal then
61
- paraStart = math.random (1 , 17 )
69
+ if isRandom then
70
+ paraStart = math.random (1 , 17 )
71
+ end
62
72
local endNumber = tonumber (bareVal )
63
73
if endNumber ~= nil then
64
74
paraEnd = paraStart + endNumber - 1
You can’t perform that action at this time.
0 commit comments