Include README in lib.rs files

Fix incompatible code-fences.
As `rustdoc` assumes `rust` others need to declare a language or use
`text`

TODO some crates have their own crate level docs independent of a README
This commit is contained in:
sholderbach 2024-05-19 22:12:56 +02:00
parent 8f01e1405c
commit aa461e608d
21 changed files with 27 additions and 8 deletions

View File

@ -1,3 +1,4 @@
#![doc = include_str!("../README.md")]
mod commands;
mod completions;
mod config_files;

View File

@ -1,3 +1,4 @@
#![doc = include_str!("../README.md")]
pub mod formats;
pub mod hook;
pub mod input_handler;

View File

@ -1,3 +1,4 @@
#![doc = include_str!("../README.md")]
mod example_test;
pub mod extra;
pub use extra::*;

View File

@ -1,3 +1,4 @@
#![doc = include_str!("../README.md")]
mod core_commands;
mod default_context;
pub mod example_support;

View File

@ -1,3 +1,4 @@
#![doc = include_str!("../README.md")]
mod color_config;
mod matching_brackets_style;
mod nu_style;

View File

@ -1,3 +1,4 @@
#![doc = include_str!("../README.md")]
mod bytes;
mod charting;
mod conversions;

View File

@ -1,3 +1,4 @@
#![doc = include_str!("../README.md")]
mod call_ext;
mod closure_eval;
pub mod column;

View File

@ -1,3 +1,4 @@
#![doc = include_str!("../README.md")]
mod commands;
mod default_context;
mod explore;

View File

@ -1,3 +1,4 @@
#![doc = include_str!("../README.md")]
pub use self::de::{
from_iter, from_reader, from_slice, from_str, Deserializer, StreamDeserializer,
};

View File

@ -1,3 +1,4 @@
#![doc = include_str!("../README.md")]
use lsp_server::{Connection, IoThreads, Message, Response, ResponseError};
use lsp_types::{
request::{Completion, GotoDefinition, HoverRequest, Request},

View File

@ -4,7 +4,7 @@ Nushell's parser is a type-directed parser, meaning that the parser will use typ
Nushell's base language is whitespace-separated tokens with the command (Nushell's term for a function) name in the head position:
```
```nushell
head1 arg1 arg2 | head2
```
@ -12,7 +12,7 @@ head1 arg1 arg2 | head2
The first job of the parser is to a lexical analysis to find where the tokens start and end in the input. This turns the above into:
```
```text
<item: "head1">, <item: "arg1">, <item: "arg2">, <pipe>, <item: "head2">
```
@ -24,7 +24,7 @@ As Nushell is a language of pipelines, pipes form a key role in both separating
The above tokens are converted the following during the lite parse phase:
```
```text
Pipeline:
Command #1:
<item: "head1">, <item: "arg1">, <item: "arg2">
@ -45,7 +45,7 @@ Each command has a shape assigned to each of the arguments it reads in. These sh
For example, if the command is written as:
```sql
```text
where $x > 10
```
@ -53,7 +53,7 @@ When the parsing happens, the parser will look up the `where` command and find i
In the above example, if the Signature of `where` said that it took three String values, the result would be:
```
```text
CallInfo:
Name: `where`
Args:
@ -64,7 +64,7 @@ CallInfo:
Or, the Signature could state that it takes in three positional arguments: a Variable, an Operator, and a Number, which would give:
```
```text
CallInfo:
Name: `where`
Args:
@ -77,7 +77,7 @@ Note that in this case, each would be checked at compile time to confirm that th
Finally, some Shapes can consume more than one token. In the above, if the `where` command stated it took in a single required argument, and that the Shape of this argument was a MathExpression, then the parser would treat the remaining tokens as part of the math expression.
```
```text
CallInfo:
Name: `where`
Args:

View File

@ -1,3 +1,4 @@
#![doc = include_str!("../README.md")]
mod deparse;
mod exportable;
mod flatten;

View File

@ -1,3 +1,4 @@
#![doc = include_str!("../README.md")]
mod assert_path_eq;
mod components;
pub mod dots;

View File

@ -1,3 +1,4 @@
#![doc = include_str!("../README.md")]
mod alias;
pub mod ast;
pub mod config;

View File

@ -7,7 +7,7 @@ The standard library is a pure-`nushell` collection of custom commands which
provide interactive utilities and building blocks for users writing casual scripts or complex applications.
To see what's here:
```
```text
> use std
> scope commands | select name usage | where name =~ "std "
#┬───────────name────────────┬──────────────────────usage──────────────────────

View File

@ -1,3 +1,4 @@
#![doc = include_str!("../README.md")]
use log::trace;
use nu_engine::eval_block;
use nu_parser::parse;

View File

@ -1,3 +1,4 @@
#![doc = include_str!("../README.md")]
mod foreground;
#[cfg(any(target_os = "android", target_os = "linux"))]
mod linux;

View File

@ -1,3 +1,4 @@
#![doc = include_str!("../README.md")]
mod table;
mod table_theme;
mod types;

View File

@ -1,3 +1,4 @@
#![doc = include_str!("../README.md")]
pub mod grid;
pub use grid::Grid;

View File

@ -1,3 +1,4 @@
#![doc = include_str!("../README.md")]
pub mod commands;
pub mod fs;
pub mod locale_override;

View File

@ -1,3 +1,4 @@
#![doc = include_str!("../README.md")]
mod casing;
pub mod ctrl_c;
mod deansi;