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+)$'
3636return  {
3737  [' lipsum'  ] =  function (args , kwargs , meta )
3838
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+ 
3947    local  paraStart  =  1 
4048    local  paraEnd  =  5 
4149
@@ -58,7 +66,9 @@ return {
5866        --  a number of paragraphs is specified, like 10
5967        local  _ ,_ ,bareVal  =  range :find (barePattern )
6068        if  bareVal  then 
61-           paraStart  =  math.random (1 , 17 )
69+           if  isRandom  then 
70+             paraStart  =  math.random (1 , 17 )
71+           end 
6272          local  endNumber  =  tonumber (bareVal )
6373          if  endNumber  ~=  nil  then 
6474            paraEnd  =  paraStart  +  endNumber  -  1 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments