diff options
author | Martin Fischer <martin@push-f.com> | 2023-08-16 08:51:29 +0200 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2023-08-19 13:41:55 +0200 |
commit | 0f460c2e77f450a2bac68eec97b2c62aa33c0495 (patch) | |
tree | c3c1592cebd140476fe05add4794548c9435942b /src/attr.rs | |
parent | a48ddc21a26f394e077e7bd80ef96b2c281e7730 (diff) |
chore: move Attribute to attr module
This is done separately so that the following commit has a cleaner diff.
Diffstat (limited to 'src/attr.rs')
-rw-r--r-- | src/attr.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/attr.rs b/src/attr.rs new file mode 100644 index 0000000..d0d506e --- /dev/null +++ b/src/attr.rs @@ -0,0 +1,14 @@ +use std::ops::Range; + +/// A HTML attribute value (plus spans). +#[derive(Debug, Eq, PartialEq)] +pub struct Attribute<O> { + /// The value of the attribute. + pub value: String, + + /// The source code span of the attribute name. + pub name_span: Range<O>, + + /// The source code span of the attribute value. + pub value_span: Range<O>, +} |