mirror of
https://codeberg.org/cage/tinmop/
synced 2025-02-16 08:00:35 +01:00
- fixed regex for percent numbering;
- formatted as floating points votes percentage in polls.
This commit is contained in:
parent
923cd09d15
commit
562d023b55
@ -69,7 +69,7 @@ color-regexp = "(?i)(\\(c\\))|(\\(r\\))" #ff0000 bold
|
||||
|
||||
color-regexp = "[0-9]{4}-[0-9]?[0-9]-[0-9]?[0-9]" #0000ff bold
|
||||
|
||||
color-regexp = "-?[0-9]+%" #ff00ff bold
|
||||
color-regexp = "-?[0-9]+(.[0-9]+)?%" #ff00ff bold
|
||||
|
||||
color-regexp = "\*[^*]+\*" #ffff00 bold
|
||||
|
||||
|
@ -263,7 +263,7 @@
|
||||
(/ (db:row-votes-count option)
|
||||
vote-sum)
|
||||
(error () 0)))
|
||||
(vote (left-padding (format nil "~a%" (* 100 rate)) 4))
|
||||
(vote (left-padding (format nil "~f%" (* 100 rate)) 4))
|
||||
(bar-w (truncate (* rate max-bar-width))))
|
||||
(format stream "~a~a " padded-index padded-title)
|
||||
(loop for i from 0 below bar-w do
|
||||
|
@ -67,7 +67,7 @@
|
||||
(loop for re in color-re do
|
||||
(setf res (colorize-line res re)))
|
||||
(colorized-line->tui-string res)))))
|
||||
(setf (rows object)
|
||||
(setf (rows object)
|
||||
(mapcar (lambda (text-line)
|
||||
(make-instance 'line
|
||||
:normal-text text-line))
|
||||
|
Loading…
x
Reference in New Issue
Block a user