Coverage report: /home/ellis/comp/core/lib/organ/element/lesser/horizontal-rule.lisp

KindCoveredAll%
expression025 0.0
branch06 0.0
Key
Not instrumented
Conditionalized out
Executed
Not executed
 
Both branches taken
One branch taken
Neither branch taken
1
 (in-package :organ)
2
 
3
 (define-org-element horizontal-rule () :lesser t)
4
 
5
 (defvar *org-horizontal-rule-min* 5
6
   "Minimum number of #\- chars in sequence which will be parsed as ORG-HORIZONTAL-RULE.")
7
 
8
 (defvar *org-horizontal-rule-char* #\-)
9
 
10
 (define-org-parser (horizontal-rule :from string)
11
   (unless (< (length input) *org-horizontal-rule-min*)
12
     (with-input-from-string (in input)
13
       (catch 'bail
14
         (loop repeat *org-horizontal-rule-min*
15
               for c = (read-char in nil)
16
               when (not (char-equal c *org-horizontal-rule-char*))
17
                 do (throw 'bail nil))
18
         (org-create :horizontal-rule)))))