Skip to content

Commit

Permalink
Fix issue typst#103
Browse files Browse the repository at this point in the history
  • Loading branch information
DerDrodt committed Dec 13, 2023
1 parent d2db1fa commit 93c5317
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/types/numeric.rs
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,8 @@ impl NumericValue {
/// Returns a range if the value is a range.
pub fn range(&self) -> Option<std::ops::Range<i32>> {
match self {
Self::Number(_) => None,
// A single number is seen as a range of length 1. See #103.
Self::Number(n) => Some(*n..(*n + 1)),
Self::Set(vec) => {
if vec.len() == 2 {
let start = vec[0].0;
Expand Down

0 comments on commit 93c5317

Please sign in to comment.