Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test cases to cover a paragraph after a list #508

Merged
merged 2 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,6 @@ groups:
it's RECOMMENDED to:

* Use a domain-specific attribute
* Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not.
* Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not

And something more.
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,6 @@ groups:
it's RECOMMENDED to:

* Use a domain-specific attribute
* Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not.
* Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not

And something more.
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ const DNS_QUESTION_NAME = ""
// - Use a domain-specific attribute
// - Set `error.type` to capture all errors, regardless of whether they are
// defined within the domain-specific set or not
//
// And something more
const ERROR_TYPE = ""

// Examples of comments for group other
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
* <li>Use a domain-specific attribute
* <li>Set {@code error.type} to capture all errors, regardless of whether they are defined within the domain-specific set or not
* </ul>
* And something more
*/
static ERROR_TYPE = "";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@

- Use a domain-specific attribute
- Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not

And something more
"""

ATTR: Final = ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@
///
/// - Use a domain-specific attribute
/// - Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not
///
/// And something more
const ERROR_TYPE: &str = "";


Expand Down
9 changes: 8 additions & 1 deletion crates/weaver_forge/src/extensions/code.rs
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,9 @@ If a specific domain defines its own set of error identifiers (such as HTTP or g
it's RECOMMENDED to:

* Use a domain-specific attribute
* Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not.. "#;
* Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not

And something more.. "#;
let ctx = serde_json::json!({
"note": note
});
Expand Down Expand Up @@ -368,6 +370,7 @@ it's RECOMMENDED to:
* <li>Use a domain-specific attribute
* <li>Set {@code error.type} to capture all errors, regardless of whether they are defined within the domain-specific set or not
* </ul>
* And something more
*/"##
);

Expand Down Expand Up @@ -398,6 +401,7 @@ it's RECOMMENDED to:
* <li>Use a domain-specific attribute
* <li>Set {@code error.type} to capture all errors, regardless of whether they are defined within the domain-specific set or not
* </ul>
* And something more
*/"##
);

Expand Down Expand Up @@ -428,6 +432,7 @@ it's RECOMMENDED to:
* <li>Use a domain-specific attribute
* <li>Set {@code error.type} to capture all errors, regardless of whether they are defined within the domain-specific set or not
* </ul>
* And something more
*/"##
);

Expand Down Expand Up @@ -458,6 +463,7 @@ it's RECOMMENDED to:
* <li>Use a domain-specific attribute
* <li>Set {@code error.type} to capture all errors, regardless of whether they are defined within the domain-specific set or not
* </ul>
* And something more
*/"##
);

Expand Down Expand Up @@ -517,6 +523,7 @@ it's RECOMMENDED to:
* are defined within the
* domain-specific set or not
* </ul>
* And something more
*/"##
);

Expand Down
16 changes: 10 additions & 6 deletions crates/weaver_forge/src/formats/html.rs
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,9 @@ If a specific domain defines its own set of error identifiers (such as HTTP or g
it's RECOMMENDED to:

* Use a domain-specific attribute
* Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not."##;
* Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not

And something more."##;
let html = renderer.render(markdown, "java", None)?;
assert_string_eq!(
&html,
Expand All @@ -550,9 +552,9 @@ If a specific domain defines its own set of error identifiers (such as HTTP or g
it's RECOMMENDED to:
<ul>
<li>Use a domain-specific attribute
<li>Set {@code error.type} to capture all errors, regardless of whether they are defined within the domain-specific set or not.
<li>Set {@code error.type} to capture all errors, regardless of whether they are defined within the domain-specific set or not
</ul>
"##
And something more."##
Comment on lines 556 to +557
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it was confusing for me at first why it sometimes ended with a newline and sometimes not, which was part of the motivation for #509

);
Ok(())
}
Expand Down Expand Up @@ -728,7 +730,9 @@ If a specific domain defines its own set of error identifiers (such as HTTP or g
it's RECOMMENDED to:

* Use a domain-specific attribute
* Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not."##;
* Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not

And something more."##;
let html = renderer.render(markdown, "java", None)?;
assert_string_eq!(
&html,
Expand Down Expand Up @@ -776,9 +780,9 @@ RECOMMENDED to:
capture all errors,
regardless of whether they
are defined within the
domain-specific set or not.
domain-specific set or not
</ul>
"##
And something more."##
);
Ok(())
}
Expand Down
18 changes: 14 additions & 4 deletions crates/weaver_forge/src/formats/markdown.rs
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,9 @@ If a specific domain defines its own set of error identifiers (such as HTTP or g
it's RECOMMENDED to:

* Use a domain-specific attribute
* Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not."##;
* Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not

And something more."##;
let rendered_md = renderer.render(markdown, "go", None)?;
assert_string_eq!(
&rendered_md,
Expand All @@ -650,7 +652,10 @@ If a specific domain defines its own set of error identifiers (such as HTTP or g
it's RECOMMENDED to:

- Use a domain-specific attribute
- Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not."##
- Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not

And something more.
"##
);

let config = WeaverConfig {
Expand Down Expand Up @@ -835,7 +840,9 @@ If a specific domain defines its own set of error identifiers (such as HTTP or g
it's RECOMMENDED to:

* Use a domain-specific attribute
* Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not."##;
* Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not

And something more."##;
let rendered_md = renderer.render(markdown, "go", None)?;
assert_string_eq!(
&rendered_md,
Expand Down Expand Up @@ -881,7 +888,10 @@ RECOMMENDED to:
all errors, regardless of
whether they are defined
within the domain-specific
set or not."##
set or not

And something more.
"##
);

let config = WeaverConfig {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"500"
],
"requirement_level": "recommended",
"note": "The `error.type` SHOULD be predictable and SHOULD have low cardinality.\nInstrumentations SHOULD document the list of errors they report.\n\nThe cardinality of `error.type` within one instrumentation library SHOULD be low.\nTelemetry consumers that aggregate data from multiple instrumentation libraries and applications\nshould be prepared for `error.type` to have high cardinality at query time when no\nadditional filters are applied.\n\nIf the operation has completed successfully, instrumentations SHOULD NOT set `error.type`.\n\nIf a specific domain defines its own set of error identifiers (such as HTTP or gRPC status codes),\nit's RECOMMENDED to:\n\n* Use a domain-specific attribute\n* Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not.",
"note": "The `error.type` SHOULD be predictable and SHOULD have low cardinality.\nInstrumentations SHOULD document the list of errors they report.\n\nThe cardinality of `error.type` within one instrumentation library SHOULD be low.\nTelemetry consumers that aggregate data from multiple instrumentation libraries and applications\nshould be prepared for `error.type` to have high cardinality at query time when no\nadditional filters are applied.\n\nIf the operation has completed successfully, instrumentations SHOULD NOT set `error.type`.\n\nIf a specific domain defines its own set of error identifiers (such as HTTP or gRPC status codes),\nit's RECOMMENDED to:\n\n* Use a domain-specific attribute\n* Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not\n\nAnd something more.",
"stability": "stable"
},
{
Expand Down Expand Up @@ -1203,7 +1203,7 @@
"requirement_level": {
"conditionally_required": "If and only if the messaging operation has failed."
},
"note": "The `error.type` SHOULD be predictable and SHOULD have low cardinality.\nInstrumentations SHOULD document the list of errors they report.\n\nThe cardinality of `error.type` within one instrumentation library SHOULD be low.\nTelemetry consumers that aggregate data from multiple instrumentation libraries and applications\nshould be prepared for `error.type` to have high cardinality at query time when no\nadditional filters are applied.\n\nIf the operation has completed successfully, instrumentations SHOULD NOT set `error.type`.\n\nIf a specific domain defines its own set of error identifiers (such as HTTP or gRPC status codes),\nit's RECOMMENDED to:\n\n* Use a domain-specific attribute\n* Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not.",
"note": "The `error.type` SHOULD be predictable and SHOULD have low cardinality.\nInstrumentations SHOULD document the list of errors they report.\n\nThe cardinality of `error.type` within one instrumentation library SHOULD be low.\nTelemetry consumers that aggregate data from multiple instrumentation libraries and applications\nshould be prepared for `error.type` to have high cardinality at query time when no\nadditional filters are applied.\n\nIf the operation has completed successfully, instrumentations SHOULD NOT set `error.type`.\n\nIf a specific domain defines its own set of error identifiers (such as HTTP or gRPC status codes),\nit's RECOMMENDED to:\n\n* Use a domain-specific attribute\n* Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not\n\nAnd something more.",
"stability": "stable"
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,6 @@ groups:
it's RECOMMENDED to:

* Use a domain-specific attribute
* Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not.
* Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not

And something more.
4 changes: 3 additions & 1 deletion data/update_markdown/registry/registry/error.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,6 @@ groups:
it's RECOMMENDED to:

* Use a domain-specific attribute
* Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not.
* Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not

And something more.
Loading