Repository: jdrouet/mrml (language: rust)

Issue:
Mjml nodes should have consistently public children
Right now, most nodes have public children, but some - like [MjAttributes](https://github.com/jdrouet/mrml/blob/main/packages/mrml-core/src/mj_attributes/mod.rs#L17) - are `pub(crate)`. This makes it impossible to manually build MJML trees with these elements having children.

Instead, all nodes should have consistently public children.


Discussion / hints:

Fix patch:
diff --git a/packages/mrml-core/src/mj_attributes/mod.rs b/packages/mrml-core/src/mj_attributes/mod.rs
index efa2626d..bc8dedff 100644
--- a/packages/mrml-core/src/mj_attributes/mod.rs
+++ b/packages/mrml-core/src/mj_attributes/mod.rs
@@ -14,7 +14,7 @@ pub const NAME: &str = "mj-attributes";
 #[cfg_attr(feature = "json", derive(mrml_json_macros::MrmlJsonComponent))]
 #[cfg_attr(feature = "json", mrml_json(tag = "NAME"))]
 pub struct MjAttributes {
-    pub(crate) children: Vec<MjAttributesChild>,
+    pub children: Vec<MjAttributesChild>,
 }
 
 #[cfg(feature = "render")]
diff --git a/packages/mrml-core/src/mj_attributes_class/mod.rs b/packages/mrml-core/src/mj_attributes_class/mod.rs
index fdd49781..aa63fd34 100644
--- a/packages/mrml-core/src/mj_attributes_class/mod.rs
+++ b/packages/mrml-core/src/mj_attributes_class/mod.rs
@@ -11,8 +11,8 @@ pub const NAME: &str = "mj-class";
 
 #[derive(Debug, Default)]
 pub struct MjAttributesClass {
-    pub(crate) name: String,
-    pub(crate) attributes: Map<String, String>,
+    pub name: String,
+    pub attributes: Map<String, String>,
 }
 
 impl MjAttributesClass {
diff --git a/packages/mrml-core/src/mj_attributes_element/mod.rs b/packages/mrml-core/src/mj_attributes_element/mod.rs
index d8eb6d44..5152f5cb 100644
--- a/packages/mrml-core/src/mj_attributes_element/mod.rs
+++ b/packages/mrml-core/src/mj_attributes_element/mod.rs
@@ -9,8 +9,8 @@ mod print;
 
 #[derive(Debug, Default)]
 pub struct MjAttributesElement {
-    pub(crate) name: String,
-    pub(crate) attributes: Map<String, String>,
+    pub name: String,
+    pub attributes: Map<String, String>,
 }
 
 impl MjAttributesElement {


Test patch: