fix issue where only 0 would be emitted for non-scientific-notation numbers
This commit is contained in:
parent
a183a9ffa2
commit
a9ec7ff73f
@ -7,6 +7,7 @@ use peekmore::PeekMoreIterator;
|
|||||||
use crate::error::SassResult;
|
use crate::error::SassResult;
|
||||||
use crate::Token;
|
use crate::Token;
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
pub(crate) struct ParsedNumber {
|
pub(crate) struct ParsedNumber {
|
||||||
pub num: String,
|
pub num: String,
|
||||||
pub dec_len: usize,
|
pub dec_len: usize,
|
||||||
|
@ -3,7 +3,7 @@ use std::mem;
|
|||||||
|
|
||||||
use num_bigint::BigInt;
|
use num_bigint::BigInt;
|
||||||
use num_rational::BigRational;
|
use num_rational::BigRational;
|
||||||
use num_traits::{pow, One, ToPrimitive, Zero};
|
use num_traits::{pow, One, ToPrimitive};
|
||||||
|
|
||||||
use codemap::{Span, Spanned};
|
use codemap::{Span, Spanned};
|
||||||
|
|
||||||
@ -631,7 +631,7 @@ impl Value {
|
|||||||
};
|
};
|
||||||
|
|
||||||
let times_ten = if val.times_ten.is_empty() {
|
let times_ten = if val.times_ten.is_empty() {
|
||||||
BigInt::zero()
|
BigInt::one()
|
||||||
} else {
|
} else {
|
||||||
pow(
|
pow(
|
||||||
BigInt::from(10),
|
BigInt::from(10),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user