mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-24 06:18:13 +08:00
Rename attributes to user_attributes
This commit is contained in:
committed by
Keavon Chambers
parent
45ae7f4342
commit
e8058513f3
@@ -25,7 +25,7 @@ pub struct LayoutAbstractTag {
|
|||||||
/// The special content attribute, representing the inner elements of this tag.
|
/// The special content attribute, representing the inner elements of this tag.
|
||||||
pub content: Option<AttributeValue>,
|
pub content: Option<AttributeValue>,
|
||||||
/// User-defined attributes, which are prefixed with ':'
|
/// User-defined attributes, which are prefixed with ':'
|
||||||
pub attributes: Vec<Attribute>,
|
pub user_attributes: Vec<Attribute>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl LayoutAbstractTag {
|
impl LayoutAbstractTag {
|
||||||
@@ -35,14 +35,14 @@ impl LayoutAbstractTag {
|
|||||||
name,
|
name,
|
||||||
layout_attributes: Default::default(),
|
layout_attributes: Default::default(),
|
||||||
content: None,
|
content: None,
|
||||||
attributes: Vec::new(),
|
user_attributes: Vec::new(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn add_attribute(&mut self, attribute: Attribute) {
|
pub fn add_attribute(&mut self, attribute: Attribute) {
|
||||||
// User-defined attribute
|
// User-defined attribute
|
||||||
if attribute.name.chars().next().unwrap() == ':' {
|
if attribute.name.chars().next().unwrap() == ':' {
|
||||||
self.attributes.push(attribute);
|
self.user_attributes.push(attribute);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
self.add_builtin_attribute(attribute);
|
self.add_builtin_attribute(attribute);
|
||||||
|
|||||||
Reference in New Issue
Block a user