Skip to content

Commit 4ad5342

Browse files
committed
Rename hidden field, refactor some code
1 parent 6bd4f63 commit 4ad5342

File tree

2 files changed

+235
-521
lines changed

2 files changed

+235
-521
lines changed

src/mdast.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ pub enum AlignKind {
7878
/// > | | --- |
7979
/// ^^^
8080
/// ```
81+
// To do: this should serialize in serde as `null`.
8182
None,
8283
}
8384

@@ -475,6 +476,7 @@ pub enum AttributeContent {
475476
)]
476477
pub struct AttributeValueExpression {
477478
pub value: String,
479+
#[cfg_attr(feature = "serde", serde(rename = "_markdownRsStops"))]
478480
pub stops: Vec<Stop>,
479481
}
480482

@@ -1161,6 +1163,7 @@ pub struct MdxjsEsm {
11611163
pub position: Option<Position>,
11621164

11631165
// Custom data on where each slice of `value` came from.
1166+
#[cfg_attr(feature = "serde", serde(rename = "_markdownRsStops"))]
11641167
pub stops: Vec<Stop>,
11651168
}
11661169

@@ -1181,6 +1184,7 @@ pub struct MdxFlowExpression {
11811184
pub position: Option<Position>,
11821185

11831186
// Custom data on where each slice of `value` came from.
1187+
#[cfg_attr(feature = "serde", serde(rename = "_markdownRsStops"))]
11841188
pub stops: Vec<Stop>,
11851189
}
11861190

@@ -1201,6 +1205,7 @@ pub struct MdxTextExpression {
12011205
pub position: Option<Position>,
12021206

12031207
// Custom data on where each slice of `value` came from.
1208+
#[cfg_attr(feature = "serde", serde(rename = "_markdownRsStops"))]
12041209
pub stops: Vec<Stop>,
12051210
}
12061211

@@ -1301,6 +1306,7 @@ pub struct MdxJsxExpressionAttribute {
13011306
/// Value.
13021307
pub value: String,
13031308
/// Stops
1309+
#[cfg_attr(feature = "serde", serde(rename = "_markdownRsStops"))]
13041310
pub stops: Vec<Stop>,
13051311
}
13061312

0 commit comments

Comments
 (0)