mirror of
https://github.com/nushell/nushell.git
synced 2025-08-14 07:48:37 +02:00
Supply metadata.content_type
for to html
output (#14990)
# Description Adds pipeline metadata to the `to html` command output (hardcoded to `text/html; charset=utf-8`) # User-Facing Changes Pipeline metadata is now included with the `to html` command output.
This commit is contained in:
@ -330,7 +330,12 @@ fn to_html(
|
||||
output_string = run_regexes(®ex_hm, &output_string);
|
||||
}
|
||||
|
||||
Ok(Value::string(output_string, head).into_pipeline_data())
|
||||
let metadata = PipelineMetadata {
|
||||
data_source: nu_protocol::DataSource::None,
|
||||
content_type: Some(mime::TEXT_HTML_UTF_8.to_string()),
|
||||
};
|
||||
|
||||
Ok(Value::string(output_string, head).into_pipeline_data_with_metadata(metadata))
|
||||
}
|
||||
|
||||
fn theme_demo(span: Span) -> PipelineData {
|
||||
|
Reference in New Issue
Block a user