From a5e8cebe3dfb40a295a7dcaa5092d092c695d913 Mon Sep 17 00:00:00 2001 From: harehare Date: Tue, 20 Oct 2026 23:04:03 +0900 Subject: [PATCH 1/9] =?UTF-8?q?=F0=9F=93=9D=20docs:=20remove=20em=20dashes?= =?UTF-8?q?=20and=20fix=20rustdoc=20warnings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rewrite em dashes in comments, docs, READMEs and skills. Runtime output strings are left as they are. Plain code spans replace intra-doc links to private items so cargo doc reports no warnings. --- .github/PRIVACY.md | 4 +-- README.md | 8 ++--- crates/mq-bench/Cargo.toml | 2 +- crates/mq-bench/README.md | 6 ++-- crates/mq-bench/src/main.rs | 2 +- crates/mq-bench/src/runner.rs | 2 +- crates/mq-check/src/certainty.rs | 2 +- crates/mq-check/src/exhaustiveness.rs | 4 +-- crates/mq-check/src/types.rs | 16 ++++----- crates/mq-check/src/unify.rs | 8 ++--- crates/mq-check/tests/error_location_test.rs | 2 +- crates/mq-crawler/src/crawler.rs | 2 +- crates/mq-crawler/src/http_client.rs | 6 ++-- crates/mq-crawler/src/robots.rs | 2 +- crates/mq-help/README.md | 4 +-- crates/mq-help/src/catalog.rs | 12 +++---- crates/mq-help/src/lib.rs | 2 +- crates/mq-help/src/reference.rs | 12 +++---- crates/mq-hir/src/hir/query.rs | 2 +- crates/mq-lang/builtin.mq | 2 +- crates/mq-lang/builtin_tests.mq | 6 ++-- crates/mq-lang/modules/gen.mq | 2 +- crates/mq-lang/modules/json.mq | 2 +- crates/mq-lang/modules/md.mq | 8 ++--- crates/mq-lang/modules/section.mq | 2 +- crates/mq-lang/modules/semver.mq | 2 +- crates/mq-lang/modules/table.mq | 2 +- crates/mq-lang/src/arena.rs | 2 +- crates/mq-lang/src/ast/parser.rs | 4 +-- crates/mq-lang/src/cst/parser.rs | 10 +++--- crates/mq-lang/src/engine.rs | 14 ++++---- crates/mq-lang/src/engine/compiled_program.rs | 2 +- crates/mq-lang/src/engine/tests.rs | 14 ++++---- crates/mq-lang/src/io.rs | 18 +++++----- crates/mq-lang/src/io/error.rs | 2 +- crates/mq-lang/src/io/mem.rs | 2 +- crates/mq-lang/src/io/native.rs | 4 +-- crates/mq-lang/src/io/sandboxed.rs | 8 ++--- crates/mq-lang/src/module.rs | 2 +- crates/mq-lang/src/module/resolver.rs | 6 ++-- .../src/module/resolver/http_import.rs | 2 +- .../src/module/resolver/http_resolver.rs | 8 ++--- crates/mq-lang/src/module/resolver/ssrf.rs | 4 +-- crates/mq-lang/src/runtime/host.rs | 2 +- crates/mq-lang/src/runtime/host/adapter.rs | 2 +- crates/mq-lang/src/runtime/runtime_value.rs | 14 ++++---- crates/mq-lang/src/tarn/value.rs | 2 +- crates/mq-lang/tests/integration_tests.rs | 8 ++--- crates/mq-lsp/src/folding_range.rs | 2 +- crates/mq-lsp/src/signature_help.rs | 4 +-- crates/mq-macros/src/lib.rs | 2 +- .../src/html_to_markdown/converter.rs | 6 ++-- .../src/html_to_markdown/iframe.rs | 2 +- crates/mq-markdown/src/markdown.rs | 12 +++---- .../tests/table_render_property_tests.rs | 6 ++-- crates/mq-repl/src/repl.rs | 2 +- crates/mq-run/src/cli.rs | 16 ++++----- crates/mq-run/src/output/table.rs | 2 +- crates/mq-test/README.md | 34 +++++++++---------- crates/mq-test/src/coverage.rs | 8 ++--- crates/mq-test/src/highlight.rs | 2 +- crates/mq-test/src/main.rs | 2 +- crates/mq-test/src/runner.rs | 16 ++++----- crates/mq-test/src/snapshot.rs | 4 +-- crates/mq-wasm/src/script.rs | 10 +++--- .../cookbook/extract-section-by-heading.md | 2 +- .../cookbook/fetch-and-filter-a-web-page.md | 10 +++--- .../find-section-containing-a-node.md | 2 +- docs/books/src/reference/control_flow.md | 4 +-- docs/books/src/reference/functions.md | 2 +- .../src/reference/modules_and_imports.md | 18 +++++----- docs/books/src/reference/selectors.md | 8 ++--- docs/books/src/reference/types_and_values.md | 6 ++-- docs/books/src/start/crawler.md | 30 ++++++++-------- docs/books/src/start/example.md | 2 +- docs/books/src/start/modules.md | 34 +++++++++---------- docs/books/src/start/web_api.md | 8 ++--- docs/books/theme/custom.css | 16 ++++----- editors/jetbrains/README.md | 14 ++++---- packages/mq-chrome-extension/README.md | 10 +++--- skills/processing-markdown/SKILL.md | 14 ++++---- skills/web-scraping/SKILL.md | 24 ++++++------- 82 files changed, 294 insertions(+), 294 deletions(-) diff --git a/.github/PRIVACY.md b/.github/PRIVACY.md index a559d700b..cc88bd1ec 100644 --- a/.github/PRIVACY.md +++ b/.github/PRIVACY.md @@ -1,4 +1,4 @@ -# Privacy Policy โ€” mq for Markdown (Chrome Extension) +# Privacy Policy: mq for Markdown (Chrome Extension) Last updated: 2026-08-10 @@ -14,7 +14,7 @@ Nothing is sent to a server. - Reads the HTML of the tab you're currently viewing (only when you click "Extract page") and converts it to Markdown, entirely on your device. - Runs the mq query you write against that content, also entirely on your device. - Optionally renders a preview overlay of the converted content on the page you're viewing. -- Copies the result to your clipboard when you click "Copy" โ€” this is a manual, user-initiated action; the extension does not read or write your clipboard otherwise. +- Copies the result to your clipboard when you click "Copy", this is a manual, user-initiated action; the extension does not read or write your clipboard otherwise. ## Data collection diff --git a/README.md b/README.md index 633d8d465..320ce1a8b 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ Visit the site ๐ŸŒ -โ€” +ยท Read the book ๐Ÿ“– -โ€” +ยท Playground ๐ŸŽฎ

mq

@@ -136,8 +136,8 @@ mq is a Rust + TypeScript monorepo. | [`mq-crawler`](crates/mq-crawler) | Directory crawler for batch Markdown processing | [![Crates.io](https://img.shields.io/crates/v/mq-crawler?style=flat-square&labelColor=162032&color=498eb6)](https://crates.io/crates/mq-crawler) | | [`mq-macros`](crates/mq-macros) | Procedural macros for builtin function registration | [![Crates.io](https://img.shields.io/crates/v/mq-macros?style=flat-square&labelColor=162032&color=498eb6)](https://crates.io/crates/mq-macros) | | [`mq-test`](crates/mq-test) | Test runner for mq | [![Crates.io](https://img.shields.io/crates/v/mq-test?style=flat-square&labelColor=162032&color=498eb6)](https://crates.io/crates/mq-test) | -| [`mq-ffi`](crates/mq-ffi) | C API for integrating mq into C applications | โ€” | -| [`mq-wasm`](crates/mq-wasm) | WebAssembly bindings | โ€” | +| [`mq-ffi`](crates/mq-ffi) | C API for integrating mq into C applications | - | +| [`mq-wasm`](crates/mq-wasm) | WebAssembly bindings | - | | [`mq-web`](packages/mq-web) | Official WebAssembly build for the browser | [![npm](https://img.shields.io/npm/v/mq-web?style=flat-square&labelColor=162032&color=498eb6)](https://www.npmjs.com/package/mq-web) | | [`mq-nodejs`](packages/mq-nodejs) | Node.js bindings | [![npm](https://img.shields.io/npm/v/mq-nodejs?style=flat-square&labelColor=162032&color=498eb6)](https://www.npmjs.com/package/mq-nodejs) | diff --git a/crates/mq-bench/Cargo.toml b/crates/mq-bench/Cargo.toml index e1d75954a..e70f36679 100644 --- a/crates/mq-bench/Cargo.toml +++ b/crates/mq-bench/Cargo.toml @@ -1,7 +1,7 @@ [package] authors.workspace = true categories = ["command-line-utilities", "text-processing"] -description = "Benchmark runner for mq โ€” times bench_ functions written in .mq files" +description = "Benchmark runner for mq: times bench_ functions written in .mq files" edition.workspace = true homepage = "https://mqlang.org/" keywords = ["markdown", "jq", "query", "benchmark"] diff --git a/crates/mq-bench/README.md b/crates/mq-bench/README.md index 3ed1fdbba..712aaa1cb 100644 --- a/crates/mq-bench/README.md +++ b/crates/mq-bench/README.md @@ -1,6 +1,6 @@

mq-bench

-Standalone benchmark runner for mq โ€” times `bench_` functions written in `.mq` files. +Standalone benchmark runner for mq: times `bench_` functions written in `.mq` files. ## Overview @@ -11,7 +11,7 @@ Standalone benchmark runner for mq โ€” times `bench_` functions written in `.mq` Bench discovery uses the CST, same as [`mq-test`](../mq-test). Each bench takes no parameters, is compiled once, warmed up, then run `--iterations` times sequentially with -`std::time::Instant` โ€” never in parallel, since that would add scheduling noise to the +`std::time::Instant`: never in parallel, since that would add scheduling noise to the timings. This complements low-level, single-instruction Tarn VM benches (written in Rust with @@ -65,4 +65,4 @@ def bench_markdown_table_render(): end ``` -Bench functions must take no parameters โ€” the runner calls each one as `name()`. +Bench functions must take no parameters: the runner calls each one as `name()`. diff --git a/crates/mq-bench/src/main.rs b/crates/mq-bench/src/main.rs index a531a6463..85679cc74 100644 --- a/crates/mq-bench/src/main.rs +++ b/crates/mq-bench/src/main.rs @@ -9,7 +9,7 @@ use std::{path::PathBuf, process::ExitCode}; #[derive(Parser, Debug)] #[command(name = "mq-bench")] #[command(version = env!("CARGO_PKG_VERSION"))] -#[command(about = "Benchmark runner for mq โ€” times bench_ functions written in .mq files")] +#[command(about = "Benchmark runner for mq: times bench_ functions written in .mq files")] #[command(after_help = "# Examples:\n\n\ ## Run all benches in a specific file:\n\ mq-bench benches.mq\n\n\ diff --git a/crates/mq-bench/src/runner.rs b/crates/mq-bench/src/runner.rs index 600e0e947..ca7e6346a 100644 --- a/crates/mq-bench/src/runner.rs +++ b/crates/mq-bench/src/runner.rs @@ -584,7 +584,7 @@ mod tests { let bench_file = dir.join("bench.mq"); fs::write(&bench_file, "def bench_needs_arg(x):\n x\nend\n").unwrap(); - // Skipped, not failed โ€” nothing errored, so the run still reports success. + // Skipped, not failed: nothing errored, so the run still reports success. let passed = BenchRunner::new(vec![bench_file]).run().unwrap(); assert!(passed); diff --git a/crates/mq-check/src/certainty.rs b/crates/mq-check/src/certainty.rs index 4b1390290..631d48c12 100644 --- a/crates/mq-check/src/certainty.rs +++ b/crates/mq-check/src/certainty.rs @@ -3,7 +3,7 @@ //! The checker infers types flow-insensitively, so a diagnostic that rests on one of those //! approximations may be wrong for a program that runs fine. A diagnostic is //! [`Certainty::Definite`] only when every operand it is about is *exact*: a value whose type is -//! known for certain, from the rules in [`Prover`]. Everything else is [`Certainty::Uncertain`], so +//! known for certain, from the rules in `Prover`. Everything else is [`Certainty::Uncertain`], so //! a case the rules do not cover can only make a diagnostic less certain, never more. use mq_hir::{Hir, SymbolId}; diff --git a/crates/mq-check/src/exhaustiveness.rs b/crates/mq-check/src/exhaustiveness.rs index 90f0201e1..df4fa4602 100644 --- a/crates/mq-check/src/exhaustiveness.rs +++ b/crates/mq-check/src/exhaustiveness.rs @@ -268,7 +268,7 @@ fn missing_cases(ty: &Type, arms: &[ArmInfo], ctx: &mut InferenceContext) -> Opt /// Checks all match expressions in the HIR for exhaustiveness and returns a list of errors. /// -/// `children_index` is passed in to avoid rebuilding it โ€” it is already constructed +/// `children_index` is passed in to avoid rebuilding it; it is already constructed /// by `generate_constraints` and reused here to save an O(N) full-HIR scan. pub(crate) fn check_match_exhaustiveness( hir: &Hir, @@ -284,7 +284,7 @@ pub(crate) fn check_match_exhaustiveness( let children = get_children(children_index, match_id); if children.len() < 2 { - // No arms โ€” nothing to check. + // No arms: nothing to check. continue; } diff --git a/crates/mq-check/src/types.rs b/crates/mq-check/src/types.rs index 49a7718ac..b2f6de6e8 100644 --- a/crates/mq-check/src/types.rs +++ b/crates/mq-check/src/types.rs @@ -60,17 +60,17 @@ pub enum Type { /// - `{a: number, b: string}` โ†’ `Record({"a": Number, "b": String}, RowEmpty)` /// - `{a: number | r}` โ†’ `Record({"a": Number}, Var(r))` Record(BTreeMap, Box), - /// Empty row โ€” marks a closed record with no additional fields + /// Empty row: marks a closed record with no additional fields RowEmpty, /// Type variable for inference Var(TypeVarId), - /// Never type (bottom type) โ€” represents unreachable code paths. + /// Never type (bottom type): represents unreachable code paths. /// /// Produced when type narrowing eliminates all possible types from a union. /// For example, `Union(Array(String), Array(Number))` minus `is_array` predicate /// leaves no viable types, producing `Never` for the else-branch. Never, - /// Dynamic type โ€” intentionally unknown at compile time (gradual typing). + /// Dynamic type: intentionally unknown at compile time (gradual typing). /// /// Unlike `Var`, `Dynamic` never participates in unification and is always /// compatible with any type. Used for the implicit pipe input (`.`) and @@ -503,10 +503,10 @@ impl Type { // Two type variables are compatible (unification will sort them out) (Type::Var(_), Type::Var(_)) => true, - // Var vs concrete โ€” unknown; do NOT assume compatible + // Var vs concrete: unknown; do NOT assume compatible (Type::Var(_), _) | (_, Type::Var(_)) => false, - // Union types: strict โ€” any member must strictly match + // Union types are strict: any member must strictly match (Type::Union(types), other) => types.iter().any(|t| t.can_branch_unify_with(other)), (other, Type::Union(types)) => types.iter().any(|t| other.can_branch_unify_with(t)), @@ -876,7 +876,7 @@ impl fmt::Display for Type { /// Type scheme for polymorphic types (generalized types) /// /// A type scheme represents a polymorphic type by quantifying over type variables. -/// For example: forall a b. (a -> b) -> [a] -> [b] +/// For example: `forall a b. (a -> b) -> [a] -> [b]` #[derive(Debug, Clone, PartialEq, Eq)] pub struct TypeScheme { /// Quantified type variables @@ -926,10 +926,10 @@ impl TypeScheme { impl fmt::Display for TypeScheme { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { if self.quantified.is_empty() { - // Monomorphic type โ€” renumber for clean display + // Monomorphic type: renumber for clean display write!(f, "{}", self.ty.display_renumbered()) } else { - // Polymorphic type โ€” renumber quantified vars to 'a, 'b, ... + // Polymorphic type: renumber quantified vars to 'a, 'b, ... let mut var_map: FxHashMap = FxHashMap::default(); for (i, var) in self.quantified.iter().enumerate() { var_map.insert(*var, i); diff --git a/crates/mq-check/src/unify.rs b/crates/mq-check/src/unify.rs index c75015857..9c28107e4 100644 --- a/crates/mq-check/src/unify.rs +++ b/crates/mq-check/src/unify.rs @@ -75,7 +75,7 @@ pub fn unify( // Binding would create an infinite type (e.g. Var(a) = Tuple(Var(a))). // This arises from valid dynamic patterns like `if (is_array(x)): x else: [x]` // where type-narrowing hasn't yet constrained the then-branch to Array. - // Skip the binding silently โ€” the variable remains free/polymorphic, which is + // Skip the binding silently: the variable remains free/polymorphic, which is // acceptable for mq's dynamic type system. return; } @@ -274,7 +274,7 @@ fn unify_records( match (only1.is_empty(), only2.is_empty()) { (true, true) => { - // No unique fields โ€” just unify the row tails + // No unique fields: just unify the row tails unify(ctx, r1, r2, range, origin); } (false, true) => { @@ -584,13 +584,13 @@ mod tests { unify(&mut ctx, &union, &Type::Bool, None, &ConstraintOrigin::General); assert!(!ctx.take_errors().is_empty()); - // Unify union with another union that has different members โ€” should fail. + // Unify union with another union that has different members: should fail. // Union(Number, String) vs Union(String, Bool): Number has no match in [String, Bool]. let union2 = Type::union(vec![Type::String, Type::Bool]); unify(&mut ctx, &union, &union2, None, &ConstraintOrigin::General); assert!(!ctx.take_errors().is_empty()); - // Unify identical unions โ€” should succeed. + // Unify identical unions: should succeed. let union3 = Type::union(vec![Type::Number, Type::String]); unify(&mut ctx, &union, &union3, None, &ConstraintOrigin::General); assert!(ctx.take_errors().is_empty()); diff --git a/crates/mq-check/tests/error_location_test.rs b/crates/mq-check/tests/error_location_test.rs index bfeb51584..3cfd71db3 100644 --- a/crates/mq-check/tests/error_location_test.rs +++ b/crates/mq-check/tests/error_location_test.rs @@ -22,7 +22,7 @@ fn check_types(code: &str) -> Vec { #[test] fn test_heterogeneous_array_allowed() { - // mq is dynamically typed โ€” heterogeneous arrays (used as tuples) are valid + // mq is dynamically typed: heterogeneous arrays (used as tuples) are valid let code = r#"[1, 2, "string"]"#; let errors = check_types(code); assert!( diff --git a/crates/mq-crawler/src/crawler.rs b/crates/mq-crawler/src/crawler.rs index e227fb009..3edb5afdd 100644 --- a/crates/mq-crawler/src/crawler.rs +++ b/crates/mq-crawler/src/crawler.rs @@ -127,7 +127,7 @@ pub struct CrawlCheckpoint { } impl CrawlCheckpoint { - /// Loads a checkpoint previously written by [`Crawler::save_checkpoint`]. + /// Loads a checkpoint previously written by `Crawler::save_checkpoint`. pub fn load(path: &str) -> Result { let data = fs::read_to_string(path).map_err(|e| format!("Failed to read checkpoint file '{}': {}", path, e))?; serde_json::from_str(&data).map_err(|e| format!("Failed to parse checkpoint file '{}': {}", path, e)) diff --git a/crates/mq-crawler/src/http_client.rs b/crates/mq-crawler/src/http_client.rs index 6760000c6..6930ab5f8 100644 --- a/crates/mq-crawler/src/http_client.rs +++ b/crates/mq-crawler/src/http_client.rs @@ -194,7 +194,7 @@ impl HttpClient { } /// Create a headless Chrome client that launches Chrome/Chromium automatically. - /// No external WebDriver server is required โ€” only Chrome/Chromium must be installed. + /// No external WebDriver server is required; only Chrome/Chromium must be installed. /// If `chrome_path` is `None`, the system Chrome is auto-detected. /// /// Pages are fetched after the browser's `load` event fires, which includes @@ -224,7 +224,7 @@ impl HttpClient { .map_err(|e| format!("Failed to launch Chrome: {}", e))?; // Run the browser event loop in a background task. - // Errors from individual events are logged but do not stop the loop โ€” + // Errors from individual events are logged but do not stop the loop: // breaking early would drop the receiver and cause all subsequent // page operations to fail with "send failed because receiver is gone". tokio::spawn(async move { @@ -393,7 +393,7 @@ impl HttpClient { } } - // Strategy 3: fixed delay โ€” applied on top of other strategies. + // Strategy 3: fixed delay, applied on top of other strategies. if !config.fixed_delay.is_zero() { tokio::time::sleep(config.fixed_delay).await; } diff --git a/crates/mq-crawler/src/robots.rs b/crates/mq-crawler/src/robots.rs index 8571b7e09..d68db2ead 100644 --- a/crates/mq-crawler/src/robots.rs +++ b/crates/mq-crawler/src/robots.rs @@ -15,7 +15,7 @@ pub struct RobotsTxt { impl RobotsTxt { /// Fetches robots.txt for a given domain. /// If a custom_robots_path is provided and is a valid URL, it fetches from there. - /// Otherwise, it constructs the default robots.txt URL (e.g., http://example.com/robots.txt). + /// Otherwise, it constructs the default robots.txt URL (e.g., `http://example.com/robots.txt`). pub async fn fetch( http_client: &HttpClient, target_url: &Url, diff --git a/crates/mq-help/README.md b/crates/mq-help/README.md index a1d4d66be..19cc2c599 100644 --- a/crates/mq-help/README.md +++ b/crates/mq-help/README.md @@ -1,6 +1,6 @@

mq-help

-Documentation catalog for the mq language: builds the single, unified catalog of every native builtin, selector, `builtin.mq` function, and standard-module function โ€” the shared source for the `mq help` CLI command and `mq-web-api`'s documentation endpoints. +Documentation catalog for the mq language: builds the single, unified catalog of every native builtin, selector, `builtin.mq` function, and standard-module function, the shared source for the `mq help` CLI command and `mq-web-api`'s documentation endpoints. ## Features @@ -29,7 +29,7 @@ let suggestion = suggest("mpa"); // Some("map") for entry in &matches { println!("{}", render_human(entry)); - // Or `render_markdown`/`render_module_markdown` โ€” Markdown output that mq can query + // Or `render_markdown`/`render_module_markdown`: Markdown output that mq can query // right back, e.g. `mq help section --markdown | mq 'select(.code.lang == "mq")'`. } ``` diff --git a/crates/mq-help/src/catalog.rs b/crates/mq-help/src/catalog.rs index 74a8f884a..0486e5692 100644 --- a/crates/mq-help/src/catalog.rs +++ b/crates/mq-help/src/catalog.rs @@ -27,7 +27,7 @@ pub struct HelpExample { } /// Full documentation for one function or selector, unifying native builtins, selectors, -/// `builtin.mq` functions, and standard-module functions behind a single shape โ€” the same +/// `builtin.mq` functions, and standard-module functions behind a single shape, the same /// shape can be served by `mq help --json` and by `mq-web-api`'s `/functions/{name}` and /// `/selectors/{name}` endpoints, so CLI and Web API can't drift apart. #[derive(Debug, Clone, Serialize)] @@ -53,7 +53,7 @@ pub struct HelpEntry { pub aliases: Vec, } -/// Looks up every entry matching `name` โ€” usually one, but a name may be defined in more +/// Looks up every entry matching `name`: usually one, but a name may be defined in more /// than one standard module, in which case every match is returned. `name` may be qualified /// as `module::function` to disambiguate a function whose name collides with its own module /// (e.g. `section::section`, distinct from the `section` module itself). @@ -111,7 +111,7 @@ fn native_entry(kind: &'static str, doc: &BuiltinDoc) -> HelpEntry { } /// Native builtin functions, selectors, `builtin.mq` functions, and language keywords with -/// their own help topic (currently just `nodes`) โ€” everything in [`all_entries`] except +/// their own help topic (currently just `nodes`); everything in [`all_entries`] except /// standard-module functions. Cheap: unlike `all_entries`/`all_modules`, it never parses a /// standard module's source. pub fn top_level_entries() -> Vec { @@ -383,7 +383,7 @@ pub fn render_module_human(module: &HelpModule) -> String { } /// Renders a single entry as Markdown, headed at `level` (e.g. `2` for `##`) so it can be -/// nested โ€” [`render_module_markdown`] renders each of its functions one level deeper. +/// nested: [`render_module_markdown`] renders each of its functions one level deeper. fn entry_markdown(entry: &HelpEntry, level: usize) -> String { let h = "#".repeat(level); let sub_h = "#".repeat(level + 1); @@ -440,7 +440,7 @@ fn entry_markdown(entry: &HelpEntry, level: usize) -> String { out } -/// Renders a single entry as Markdown โ€” e.g. queryable with mq itself via +/// Renders a single entry as Markdown, e.g. queryable with mq itself via /// `mq help --markdown | mq 'select(.code.lang == "mq")'`. pub fn render_markdown(entry: &HelpEntry) -> String { entry_markdown(entry, 2) @@ -654,7 +654,7 @@ mod tests { parts } - /// Every example shown by `mq help` is a real, runnable snippet โ€” this evaluates each + /// Every example shown by `mq help` is a real, runnable snippet; this evaluates each /// one through the actual engine and checks it against its recorded `expected` output, /// so a stale/wrong example fails CI instead of silently misleading a reader. #[test] diff --git a/crates/mq-help/src/lib.rs b/crates/mq-help/src/lib.rs index 714c7ee13..c6caf4871 100644 --- a/crates/mq-help/src/lib.rs +++ b/crates/mq-help/src/lib.rs @@ -6,7 +6,7 @@ //! the `catalog` feature (on by default); without it only the doc tables are built. The //! catalog combines two things: //! -//! - [`reference`]: extracts `MqFnDoc`/`MqExample` from the CST of any mq source, by parsing +//! - [`mod@reference`]: extracts `MqFnDoc`/`MqExample` from the CST of any mq source, by parsing //! the Markdown-ish doc-comment convention above each `def` (used for `builtin.mq` //! and every standard module). //! - [`catalog`]: unifies that CST-extracted documentation with the native builtin diff --git a/crates/mq-help/src/reference.rs b/crates/mq-help/src/reference.rs index 5529df8fd..853b9e64d 100644 --- a/crates/mq-help/src/reference.rs +++ b/crates/mq-help/src/reference.rs @@ -74,7 +74,7 @@ pub fn extract_module_doc(source: &str) -> Option { } /// Extracts a module's header doc and function docs in a single CST parse. `extract_module_doc` -/// and `extract_functions_from_cst` each call this and discard half the result โ€” fine for one- +/// and `extract_functions_from_cst` each call this and discard half the result, fine for one- /// off lookups, but callers needing both (e.g. `mq help`'s catalog build, over every standard /// module) should call this directly to parse each module's source only once. pub fn extract_module(source: &str, skip_native: bool) -> (Option, Vec) { @@ -130,7 +130,7 @@ fn collect_module_functions(module_node: &Shared, prefix: &str, out: &m } // If node 0 is a documented def, its first paragraph is only a module header when a second -// paragraph is left over for its own doc โ€” otherwise it's just that def's doc comment. +// paragraph is left over for its own doc; otherwise it's just that def's doc comment. fn module_header_paragraph(source: &str, nodes: &[Shared]) -> Option> { let mut paragraphs = leading_comment_paragraphs(source); if paragraphs.is_empty() { @@ -218,9 +218,9 @@ fn def_name(node: &Shared) -> Option { /// One line of a doc comment outside any fenced code block, classified by its role in the /// Markdown-ish convention documented on [`extract_functions_from_cst`]. Adding a new /// recognized line kind (e.g. a future `Capability:` line) means adding one variant here and -/// one match arm in [`parse_doc_comment`] โ€” the fence-toggling logic never has to change. +/// one match arm in [`parse_doc_comment`]: the fence-toggling logic never has to change. enum DocLine<'a> { - /// A blank line, or the literal `Example:` label โ€” pure formatting, carries no data. + /// A blank line, or the literal `Example:` label: pure formatting, carries no data. Skip, /// `Returns: TYPE` Returns(&'a str), @@ -278,7 +278,7 @@ fn parse_doc_comment(lines: impl IntoIterator) -> (String, Option /// Parses the (already de-indented) lines inside one ` ``` ` fence into a single example. /// /// Everything before the first `#=>` line is the code; the arrow's own text plus every line -/// after it (up to the fence close) is the expected value, joined with `\n` โ€” so output that's +/// after it (up to the fence close) is the expected value, joined with `\n`, so output that's /// naturally multi-line (a CSV/table/frontmatter render, ...) doesn't need to be contorted onto /// one line. A fence with no `#=>` line, or no code before it, yields no example. A function /// with multiple examples uses multiple fences (see `test_extract_functions_multiple_examples`), @@ -392,7 +392,7 @@ mod tests { #[test] fn test_module_doc_absent_when_only_first_fn_doc() { // A single paragraph directly above the first (public) def is that def's own doc, - // not a module header โ€” even though it happens to precede a blank-separated Example. + // not a module header, even though it happens to precede a blank-separated Example. let src = "# Checks if input is an array.\n#\n# Example:\n# ```\n# is_array([1, 2])\n# #=> true\n# ```\ndef is_array(a): a;"; assert_eq!(extract_module_doc(src), None); let fns = extract_functions_from_cst(src, false); diff --git a/crates/mq-hir/src/hir/query.rs b/crates/mq-hir/src/hir/query.rs index a531e5e21..f7f778c09 100644 --- a/crates/mq-hir/src/hir/query.rs +++ b/crates/mq-hir/src/hir/query.rs @@ -1,4 +1,4 @@ -//! Query methods for the HIR โ€” read-only accessors over symbols, scopes, and sources. +//! Query methods for the HIR: read-only accessors over symbols, scopes, and sources. use rustc_hash::FxHashMap; use smol_str::SmolStr; diff --git a/crates/mq-lang/builtin.mq b/crates/mq-lang/builtin.mq index 924e6f7da..0f24e1a32 100644 --- a/crates/mq-lang/builtin.mq +++ b/crates/mq-lang/builtin.mq @@ -2595,7 +2595,7 @@ def stats_by(arr, group_f, value_f, aggs = ["sum", "mean", "min", "max", "stddev end # Buckets a numeric array into `buckets` equal-width bins between its min and -# max, returning an array of `{range, count, bar}` โ€” `bar` is a block-character +# max, returning an array of `{range, count, bar}`; `bar` is a block-character # bar scaled so the tallest bucket is 40 characters wide, handy for a quick # terminal or Markdown look at a distribution. # diff --git a/crates/mq-lang/builtin_tests.mq b/crates/mq-lang/builtin_tests.mq index 473230750..218cbdf1a 100644 --- a/crates/mq-lang/builtin_tests.mq +++ b/crates/mq-lang/builtin_tests.mq @@ -1711,15 +1711,15 @@ def test_walk(value, f, expected): end def test_walk_markdown(): - # markdown: text leaf โ€” identity preserves text content + # markdown text leaf: identity preserves text content let result1 = do "plain text" | to_markdown() | first() | walk(fn(n): n;) | to_text(); | assert_eq(result1, "plain text") - # markdown: heading โ€” identity preserves HTML output + # markdown heading: identity preserves HTML output | let result2 = do "# heading" | to_markdown() | first() | walk(fn(n): n;) | to_html(); | assert_eq(result2, "

heading

") - # markdown: h2 โ€” identity preserves depth + # markdown h2: identity preserves depth | let result3 = do "## section" | to_markdown() | first() | walk(fn(n): n;) | to_html(); | assert_eq(result3, "

section

") diff --git a/crates/mq-lang/modules/gen.mq b/crates/mq-lang/modules/gen.mq index 4d0de7c5a..70fd89489 100644 --- a/crates/mq-lang/modules/gen.mq +++ b/crates/mq-lang/modules/gen.mq @@ -1,6 +1,6 @@ # Generator combinators for property-based testing. # -# A generator is a plain function `fn(seed): value;` โ€” a deterministic mapping from an integer +# A generator is a plain function `fn(seed): value;`, a deterministic mapping from an integer # seed to a generated value. Combinators derive a distinct sub-seed per part so nested generators # don't correlate. # diff --git a/crates/mq-lang/modules/json.mq b/crates/mq-lang/modules/json.mq index 729225a97..7138e0ed2 100644 --- a/crates/mq-lang/modules/json.mq +++ b/crates/mq-lang/modules/json.mq @@ -536,7 +536,7 @@ end # `;;;` (the convention used by e.g. Hexo). Unlike YAML (`---`) and TOML # (`+++`) front matter, mq's Markdown parser does not recognize `;;;` blocks # as a distinct front matter node, so this output won't round-trip through -# `frontmatter`/`is_yaml`/`is_toml`-style selectors โ€” it's meant for +# `frontmatter`/`is_yaml`/`is_toml`-style selectors: it's meant for # generating files for tools that do support this convention. # # Example: diff --git a/crates/mq-lang/modules/md.mq b/crates/mq-lang/modules/md.mq index 08e4ecdb2..c02fef689 100644 --- a/crates/mq-lang/modules/md.mq +++ b/crates/mq-lang/modules/md.mq @@ -3,7 +3,7 @@ # This module is under development. APIs and behavior may change without notice. # # `md::reference_index` and `md::resolve_references` need every document node at -# once โ€” pass `-A` on the CLI, or pipe through `nodes` in an inline query/script; +# once; pass `-A` on the CLI, or pipe through `nodes` in an inline query/script; # a single node instead prints a stderr warning and is treated as a one-element array. # Wraps `value` in a heading node at the given `depth` (1-6). @@ -415,7 +415,7 @@ end # footnote definitions (`[^ident]: ...`), and indexes them by identifier. Each # identifier maps to an array of every definition found for it, in document # order, so a duplicate definition (multiple `[ident]:` lines for the same -# `ident`) shows up as an array with more than one entry โ€” CommonMark resolves +# `ident`) shows up as an array with more than one entry; CommonMark resolves # such a duplicate to the first one, which `md::resolve_references` picks. # Each entry carries its `location` (from `get_location`) for building # diagnostics like linkcheck output. @@ -471,8 +471,8 @@ end # `index` defaults to `md::reference_index(md_nodes)`, resolving references # against their own document. Pass an explicit index (e.g. built from a # different set of nodes) to resolve references that got separated from their -# definitions โ€” for example when a document is split or a section is moved -# into another file โ€” which is exactly the case where a reference legitimately +# definitions, for example when a document is split or a section is moved +# into another file, which is exactly the case where a reference legitimately # comes back unresolved. # # Example: diff --git a/crates/mq-lang/modules/section.mq b/crates/mq-lang/modules/section.mq index e50296a8d..53e47e9c5 100644 --- a/crates/mq-lang/modules/section.mq +++ b/crates/mq-lang/modules/section.mq @@ -2,7 +2,7 @@ # # Call it via `import "section"` then `section::fn()` (recommended, namespaced), # `include "section"` then `fn()` (no namespace prefix), or `mq -A 'section::fn()'` -# on the command line. Section functions need every document node at once โ€” pass +# on the command line. Section functions need every document node at once; pass # `-A` on the CLI, or pipe through `nodes` in an inline query/script; a single # node instead prints a stderr warning and is treated as a one-element array. # diff --git a/crates/mq-lang/modules/semver.mq b/crates/mq-lang/modules/semver.mq index 09df93a6c..85a815da3 100644 --- a/crates/mq-lang/modules/semver.mq +++ b/crates/mq-lang/modules/semver.mq @@ -395,7 +395,7 @@ end # either the hyphen range or ">=2.0.0"). # # Pre-release versions (e.g. "1.0.0-alpha") are ordered using the same precedence -# rules as `semver_compare` and are matched like any other version โ€” there is no +# rules as `semver_compare` and are matched like any other version; there is no # npm-style restriction that hides pre-releases from ranges that don't mention one. # # Example: semver_satisfies("1.5.0", ">=1.0.0,<2.0.0") == true diff --git a/crates/mq-lang/modules/table.mq b/crates/mq-lang/modules/table.mq index 6bf7dd855..bb3ade09a 100644 --- a/crates/mq-lang/modules/table.mq +++ b/crates/mq-lang/modules/table.mq @@ -1,7 +1,7 @@ # The table module extracts and transforms Markdown tables. This module is # under development; APIs and behavior may change without notice. # -# Call it via `import "table"` then `table::fn()` โ€” from an inline query, a +# Call it via `import "table"` then `table::fn()`, from an inline query, a # script, or `mq -A 'import "table" | table::fn()'` on the command line. # Unlike `section`, `import` must always be written explicitly (no `include` # shortcut). Table functions need every document node at once: pass `-A` on diff --git a/crates/mq-lang/src/arena.rs b/crates/mq-lang/src/arena.rs index 5ad026b24..f4f134695 100644 --- a/crates/mq-lang/src/arena.rs +++ b/crates/mq-lang/src/arena.rs @@ -68,7 +68,7 @@ impl ArenaId { /// that can be used to retrieve elements later. This pattern provides fast allocation /// and cache-friendly access. /// -/// A layered arena (see [`Arena::layered`]) sits on a parent arena: it allocates its own +/// A layered arena (see `Arena::layered`) sits on a parent arena: it allocates its own /// elements and still resolves the parent's ids, so it can be dropped once its ids are unused. #[derive(Debug, Clone, Default)] pub struct Arena { diff --git a/crates/mq-lang/src/ast/parser.rs b/crates/mq-lang/src/ast/parser.rs index 1ac13e6a4..cab8b8d08 100644 --- a/crates/mq-lang/src/ast/parser.rs +++ b/crates/mq-lang/src/ast/parser.rs @@ -8645,7 +8645,7 @@ Shared::new(Node { } } - // ."key"[] or ."key"[n] โ€” single property selector followed by array iterator/index + // ."key"[] or ."key"[n]: single property selector followed by array iterator/index #[rstest] #[case::all_elements(".\"items\"", None, vec![Selector::Property("items".into()), Selector::List(None, None)])] #[case::index_0(".\"items\"", Some(0usize), vec![Selector::Property("items".into()), Selector::List(Some(0), None)])] @@ -8703,7 +8703,7 @@ Shared::new(Node { } } - // ."a"."b"[] or ."a"."b"[n] โ€” chained property selectors followed by array iterator/index + // ."a"."b"[] or ."a"."b"[n]: chained property selectors followed by array iterator/index #[rstest] #[case::all_elements(".\"a\"", ".\"b\"", None, vec![Selector::Property("a".into()), Selector::Property("b".into()), Selector::List(None, None)])] #[case::index_0(".\"a\"", ".\"b\"", Some(0usize), vec![Selector::Property("a".into()), Selector::Property("b".into()), Selector::List(Some(0), None)])] diff --git a/crates/mq-lang/src/cst/parser.rs b/crates/mq-lang/src/cst/parser.rs index 6d2e5e7e4..2e5ad5116 100644 --- a/crates/mq-lang/src/cst/parser.rs +++ b/crates/mq-lang/src/cst/parser.rs @@ -8493,7 +8493,7 @@ Shared::new(Node { ) )] #[case::call_with_implicit_pipeline_second_arg( - // foo(x, a | b) โ€” pipeline is the second argument + // foo(x, a | b): pipeline is the second argument vec![ Shared::new(token(TokenKind::Ident("foo".into()))), Shared::new(token(TokenKind::LParen)), @@ -8567,7 +8567,7 @@ Shared::new(Node { ) )] #[case::call_with_implicit_pipeline_multiline( - // foo(a\n| b) โ€” pipeline spanning two lines + // foo(a\n| b): pipeline spanning two lines vec![ Shared::new(token(TokenKind::Ident("foo".into()))), Shared::new(token(TokenKind::LParen)), @@ -8629,7 +8629,7 @@ Shared::new(Node { ) )] #[case::call_with_implicit_pipeline_call_exprs( - // foo(bar() | baz()) โ€” function calls inside pipeline + // foo(bar() | baz()): function calls inside pipeline vec![ Shared::new(token(TokenKind::Ident("foo".into()))), Shared::new(token(TokenKind::LParen)), @@ -10295,7 +10295,7 @@ Shared::new(Node { ) )] #[case::unmatched_end_at_root( - // `. end end eof` โ€” the first `end` closes a root statement, the second `end` has no + // `. end end eof`: the first `end` closes a root statement, the second `end` has no // matching open block and should produce `UnmatchedEnd` pointing at the first `end`. vec![ Shared::new(token(TokenKind::Selector(".".into()))), @@ -10329,7 +10329,7 @@ Shared::new(Node { ) )] #[case::unmatched_end_at_root_pipe_follows( - // `. end end | ident eof` โ€” mirrors the real-world `def foo: if (.): . end end | foo` + // `. end end | ident eof`: mirrors the real-world `def foo: if (.): . end end | foo` // scenario where the extra `end` should be flagged, not the pipe after it. vec![ Shared::new(token(TokenKind::Selector(".".into()))), diff --git a/crates/mq-lang/src/engine.rs b/crates/mq-lang/src/engine.rs index 727598872..82fea4429 100644 --- a/crates/mq-lang/src/engine.rs +++ b/crates/mq-lang/src/engine.rs @@ -55,7 +55,7 @@ pub enum DefineValueError { /// ``` #[derive(Debug, Clone)] pub struct Engine> { - /// VM state โ€” see [`tarn::VmState`]. + /// VM state: see [`tarn::VmState`]. pub(crate) vm: tarn::VmState, pub(crate) token_arena: Shared>>, pub(crate) vm_module_prelude: Vec, @@ -94,7 +94,7 @@ impl Default for Engine> { } // `new` is pinned to the default `IO` (rather than generic over any `IO: Default`) because Rust -// doesn't use a generic parameter's default as an inference fallback โ€” callers like +// doesn't use a generic parameter's default as an inference fallback; callers like // `Engine::new(resolver)` have no other way to pin `IO`. Mirrors the `HashMap::new`/ // `HashMap::with_hasher` split. To use a different `IO`, annotate the binding's type, e.g. // `let engine: Engine = Engine::new(resolver);` (this only fixes the *value* passed at @@ -138,7 +138,7 @@ impl Engine { impl Engine { /// Like the [`SandboxedIo`]-pinned [`Engine::new`], but generic over `IO` and - /// takes the [`Io`] value up front โ€” for hosts that need to select the `Io` *type* at + /// takes the [`Io`] value up front, for hosts that need to select the `Io` *type* at /// construction time, not just its value via [`set_io`](Self::set_io). Useful for e.g. a /// test runner that wants an in-memory mock `Io` installed from the start. /// @@ -181,7 +181,7 @@ impl Engine { } /// Sets the [`Io`] this engine uses for file, environment-variable, and network - /// access โ€” both for builtins (`read_file`, `write_file`, `http`, ...) and for + /// access: both for builtins (`read_file`, `write_file`, `http`, ...) and for /// local module resolution (`include`/`import`). Defaults to an all-denied /// [`SandboxedIo`](crate::SandboxedIo) wrapping [`NativeIo`](crate::NativeIo), /// so a host must opt in explicitly. @@ -251,10 +251,10 @@ impl Engine { /// - A raw form taking the already-evaluated call arguments as a slice and returning a /// single [`RuntimeValue`]: `|args: &[RuntimeValue]| -> HostFnResult { .. }`. /// - A typed form taking up to eight plain Rust arguments (any combination of `i64`, `f64`, - /// `String`, `bool`, `RuntimeValue`, `Vec`, or `Option` for a [`ValueAdapter`] `T`), + /// `String`, `bool`, `RuntimeValue`, `Vec`, or `Option` for a [`ValueAdapter`](crate::ValueAdapter) `T`), /// returning `Result` for an `R: ValueAdapter`. Argument and return /// values are converted to/from `RuntimeValue` automatically; a wrong argument count or - /// type is reported as a [`HostFunctionError`] rather than panicking. + /// type is reported as a [`HostFunctionError`](crate::HostFunctionError) rather than panicking. /// /// Errors and panics raised by the function are caught at the call boundary and surfaced as /// a normal mq runtime error rather than aborting evaluation or unwinding through the @@ -263,7 +263,7 @@ impl Engine { /// /// A registered function only fills in a name that would otherwise be undefined: a `def` of /// the same name always takes precedence, and so does *any* built-in function name, whether - /// or not [`Self::load_builtin_module`] was called โ€” name resolution itself falls back to + /// or not [`Self::load_builtin_module`] was called: name resolution itself falls back to /// the built-in table before host functions are ever consulted. Host functions therefore /// extend the set of callable names rather than override existing ones; pick a name that /// doesn't collide with a builtin. diff --git a/crates/mq-lang/src/engine/compiled_program.rs b/crates/mq-lang/src/engine/compiled_program.rs index 946057157..f3ccd8323 100644 --- a/crates/mq-lang/src/engine/compiled_program.rs +++ b/crates/mq-lang/src/engine/compiled_program.rs @@ -4,7 +4,7 @@ use crate::SharedCell; #[cfg(any(not(feature = "debugger"), feature = "mqc"))] use crate::{Shared, tarn}; -/// A compiled mq program bundled with its original source, returned by [`Engine::compile`]. +/// A compiled mq program bundled with its original source, returned by `Engine::compile`. #[derive(Debug, Clone)] pub struct CompiledProgram { pub(crate) source: String, diff --git a/crates/mq-lang/src/engine/tests.rs b/crates/mq-lang/src/engine/tests.rs index f2814cffe..18e9d51e6 100644 --- a/crates/mq-lang/src/engine/tests.rs +++ b/crates/mq-lang/src/engine/tests.rs @@ -1106,7 +1106,7 @@ fn test_builtin_cache_sequential_engines_consistent( } /// Compiling and evaluating a builtin function call on a second engine (cache path) must -/// produce the correct result โ€” verifying that token_ids in the compiled program are valid +/// produce the correct result: verifying that token_ids in the compiled program are valid /// when the builtin tokens were injected from cache rather than freshly parsed. #[rstest] #[case("add(1, 2)", vec!["".to_string().into()], vec![3.into()])] @@ -1173,7 +1173,7 @@ fn test_builtin_cache_runtime_error_token_location_correct(#[case] query: &str, } /// Two sequential engines (one possibly fresh-parse, one cache) must produce identical -/// error locations โ€” confirming that token_id indices are not shifted by cache replay. +/// error locations: confirming that token_id indices are not shifted by cache replay. #[rstest] #[case("undefined_fn()")] #[case("1 | undefined_fn()")] @@ -1362,7 +1362,7 @@ fn test_eval_debug_expression_vm_paused_frame_binding_shadows_soft_builtin() { fn test_eval_compiled_vm_error_is_a_real_miette_diagnostic() { use crate::RuntimeValue; - // `eval_compiled_vm` used to return a bare `Result<_, String>` โ€” this checks it now + // `eval_compiled_vm` used to return a bare `Result<_, String>`; this checks it now // produces the same public `error::Error` shape `eval_compiled` does: a real cause // (not just a `Display` string) with a non-trivial source span pointing at the // failing expression. @@ -1636,7 +1636,7 @@ fn test_eval_compiled_vm_recompiles_after_search_paths_change_on_same_engine() { &[RuntimeValue::String(Shared::new("first".to_string()))] ); - // Same CompiledProgram, same engine โ€” only search paths changed. + // Same CompiledProgram, same engine; only search paths changed. engine.set_search_paths(vec![second_dir.path().to_owned()]); assert_eq!( engine @@ -1841,7 +1841,7 @@ fn test_module_var_initializer_runs_once_per_eval_for_import() { }); // `import` always addresses its vars through the qualified (aliased) compile path, - // unlike `include`'s plain named locals โ€” a separate code path this fix must also cover. + // unlike `include`'s plain named locals: a separate code path this fix must also cover. engine.import_module("side_effect_counter_import").unwrap(); let baseline = call_count.load(Ordering::SeqCst); @@ -2505,7 +2505,7 @@ fn test_cached_vm_does_not_reuse_an_environment_after_its_engine_drops() { fn test_eval_compiled_vm_resolves_a_local_file_import() { use crate::RuntimeValue; - // Mirrors `test_eval_import_as_alias`, but through `eval_compiled_vm` โ€” this only works + // Mirrors `test_eval_import_as_alias`, but through `eval_compiled_vm`; this only works // because `eval_compiled_vm` threads `self.vm.module_loader.clone()` into the VM // compiler instead of it hardcoding an in-memory-only `StdModuleResolver` // (`STANDARD_MODULES` only, no filesystem access). @@ -2567,7 +2567,7 @@ fn test_eval_compiled_vm_notifies_debugger_of_uncaught_error() { .lock() .unwrap() .iter() - // "Division by zero" โ€” `RuntimeError::ZeroDivision`'s wording, the same the + // "Division by zero": `RuntimeError::ZeroDivision`'s wording, the same the // tree-walker uses; `notify_error` converts through it rather than using // `VmError`'s own (not user-facing) `Display`. See `notify_error`'s doc comment. .any(|message| message.contains("Division by zero")) diff --git a/crates/mq-lang/src/io.rs b/crates/mq-lang/src/io.rs index ec5e25fd5..ae450b6ff 100644 --- a/crates/mq-lang/src/io.rs +++ b/crates/mq-lang/src/io.rs @@ -1,6 +1,6 @@ -//! Abstracts every environment-dependent operation the mq engine needs โ€” file +//! Abstracts every environment-dependent operation the mq engine needs (file //! read/write, environment-variable access, network fetch, and external -//! process execution โ€” behind a single trait, so the core evaluator, parser, +//! process execution) behind a single trait, so the core evaluator, parser, //! and module resolvers never call `std::fs`/`std::env`/a network //! client/`std::process::Command` directly. Concrete implementations are //! injected per [`Engine`](crate::Engine) instance. @@ -13,7 +13,7 @@ //! //! `LocalFsModuleResolver` (local module resolution) routes through this //! trait; `HttpModuleResolver`/`UreqFetcher` (HTTP module imports) do not yet -//! โ€” that unification, including relocating `UreqFetcher`'s on-disk +//! that unification, including relocating `UreqFetcher`'s on-disk //! cache/lockfile logic into `NativeIo`, is left for a follow-up. mod error; @@ -29,7 +29,7 @@ pub use sandboxed::{EnvAccess, NetAccess, PathAccess, SandboxedIo}; /// `pub` here (rather than gated by the `mock-io` feature) would still not leak `MemIo` /// externally, since the `io` module itself is private to the crate (see `mod io;` in -/// `lib.rs`) โ€” but it's gated anyway so the "unused" build (neither `test` nor `mock-io`) +/// `lib.rs`), but it's gated anyway so the "unused" build (neither `test` nor `mock-io`) /// doesn't warn. The crate-root re-export in `lib.rs` is what actually governs external /// visibility, since [`MemIo`] and the `mock_fetch` builtin are opt-in, testing-focused surface. #[cfg(any(test, feature = "mock-io"))] @@ -67,7 +67,7 @@ pub struct HttpRequestSpec { } /// Kind of filesystem entry reported by [`Io::metadata`]. Reflects the entry itself -/// (via a symlink-unaware stat), not what a symlink points to โ€” a symlink is always +/// (via a symlink-unaware stat), not what a symlink points to; a symlink is always /// reported as `Symlink`, never followed to its target's kind. #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum FileKind { @@ -91,7 +91,7 @@ impl FileKind { } /// Metadata for the entry at a path, as returned by [`Io::metadata`], backing the -/// `file_info` builtin. Never follows a symlink to inspect its target โ€” see [`FileKind`]. +/// `file_info` builtin. Never follows a symlink to inspect its target, see [`FileKind`]. #[derive(Debug, Clone, Copy)] pub struct FileMetadata { pub kind: FileKind, @@ -147,7 +147,7 @@ pub trait Io: std::fmt::Debug + IoSyncBound + 'static { fn env_vars(&self) -> Result, IoError>; /// Callers are responsible for URL/domain policy (HTTPS-only, allowlisting, - /// etc.) before calling this โ€” `fetch` is a minimal transport primitive. + /// etc.) before calling this: `fetch` is a minimal transport primitive. fn fetch(&self, url: &str) -> Result; /// General-purpose HTTP request (arbitrary method/body/headers), backing @@ -194,8 +194,8 @@ pub trait Io: std::fmt::Debug + IoSyncBound + 'static { /// The current working directory, if known. fn current_dir(&self) -> Option; - /// Runs `command` with `args` as a child process โ€” never through a shell, so shell - /// metacharacters in `args` are never interpreted โ€” and returns its captured stdout as a + /// Runs `command` with `args` as a child process, never through a shell, so shell + /// metacharacters in `args` are never interpreted, and returns its captured stdout as a /// string. A non-zero exit status is reported as an error that includes the process's /// stderr. Callers are responsible for policy (which commands are permitted) before calling /// this, same as [`fetch`](Self::fetch)'s URL/domain policy. diff --git a/crates/mq-lang/src/io/error.rs b/crates/mq-lang/src/io/error.rs index 1ebe2df80..7e7ebb403 100644 --- a/crates/mq-lang/src/io/error.rs +++ b/crates/mq-lang/src/io/error.rs @@ -1,7 +1,7 @@ use std::borrow::Cow; use thiserror::Error; -/// Error returned by [`Io`](super::Io) operations. Internal plumbing type โ€” +/// Error returned by [`Io`](super::Io) operations. Internal plumbing type: /// call sites are expected to convert it into whatever domain error type they /// already use (e.g. `ModuleError` for module resolution, the builtin /// evaluator's own error type) rather than surface it to `miette` directly. diff --git a/crates/mq-lang/src/io/mem.rs b/crates/mq-lang/src/io/mem.rs index 0468b9124..7b0b96a34 100644 --- a/crates/mq-lang/src/io/mem.rs +++ b/crates/mq-lang/src/io/mem.rs @@ -7,7 +7,7 @@ use std::sync::{ atomic::{AtomicUsize, Ordering}, }; -/// In-memory [`Io`] โ€” file writes, environment variables, and fetch/HTTP responses all +/// In-memory [`Io`]: file writes, environment variables, and fetch/HTTP responses all /// live in-process instead of touching the real filesystem/network. Useful both for unit /// tests that only need to assert *what was asked for*, and for embeddings (e.g. `mq-test`) /// that want a hermetic `Io` a query can read from and, via [`Self::set_fetch_response`], diff --git a/crates/mq-lang/src/io/native.rs b/crates/mq-lang/src/io/native.rs index 99e32ce90..26664f21c 100644 --- a/crates/mq-lang/src/io/native.rs +++ b/crates/mq-lang/src/io/native.rs @@ -9,7 +9,7 @@ use std::path::{Path, PathBuf}; /// [`SandboxedIo`](super::SandboxedIo) to gate read/write/net permissions. /// /// `fetch` does not yet implement the on-disk caching/lockfile behavior that -/// `UreqFetcher` (the module-import HTTP fetcher) has today โ€” that migration +/// `UreqFetcher` (the module-import HTTP fetcher) has today; that migration /// is follow-up work. This is a plain, uncached HTTPS GET through the same /// SSRF-hardened agent used elsewhere in this crate. #[derive(Debug, Clone)] @@ -440,7 +440,7 @@ mod tests { let result = io.metadata(&path); // A root-run process (e.g. inside a container) ignores permission bits, so only - // assert when the OS actually enforced them here โ€” otherwise the test would flake. + // assert when the OS actually enforced them here; otherwise the test would flake. let permissions_enforced = std::fs::metadata(&path).is_err(); // Restore permissions so the tempdir can be cleaned up. diff --git a/crates/mq-lang/src/io/sandboxed.rs b/crates/mq-lang/src/io/sandboxed.rs index e8d90fa40..7f2fdf939 100644 --- a/crates/mq-lang/src/io/sandboxed.rs +++ b/crates/mq-lang/src/io/sandboxed.rs @@ -16,7 +16,7 @@ pub use run_access::RunAccess; /// read/write/net/run/env permission grants, enforced by every operation. All /// five default to fully denied (fail safe), and may additionally be /// restricted to an allowlist via [`PathAccess::AllowedPaths`]/[`NetAccess::AllowedDomains`]/ -/// [`RunAccess::AllowedCommands`]/[`EnvAccess::AllowedNames`]. +/// `RunAccess::AllowedCommands`/[`EnvAccess::AllowedNames`]. /// /// Every operation enforces its own permission independently of any external /// pre-check, so a caller cannot accidentally bypass sandboxing by forgetting @@ -74,8 +74,8 @@ impl SandboxedIo { self } - /// Gates [`Io::execute`], the primitive backing the `system()` builtin โ€” external process - /// execution. See [`Self::allow_read`] for the accepted forms; `Vec`/ + /// Gates [`Io::execute`], the primitive backing the `system()` builtin (external process + /// execution). See [`Self::allow_read`] for the accepted forms; `Vec`/ /// `Option>` restrict by command name. pub fn allow_run(mut self, allow: impl Into) -> Self { self.allow_run = allow.into(); @@ -564,7 +564,7 @@ mod tests { } /// `is_read_allowed`/`is_write_allowed`/`is_env_allowed` report whether *any* access was - /// granted, including a restricted allowlist โ€” they don't distinguish full vs. restricted + /// granted, including a restricted allowlist: they don't distinguish full vs. restricted /// access. #[rstest] #[case::nothing_granted(false, false, false, false, false, (false, false, false, false, false))] diff --git a/crates/mq-lang/src/module.rs b/crates/mq-lang/src/module.rs index 454d9a3ec..899668399 100644 --- a/crates/mq-lang/src/module.rs +++ b/crates/mq-lang/src/module.rs @@ -1029,7 +1029,7 @@ mod tests { let mut loader1 = ModuleLoader::new(DefaultModuleResolver::default()); loader1.load_builtin(pristine_token_arena).unwrap(); - // Second pristine load โ€” this is the cache-hit path. + // Second pristine load: this is the cache-hit path. let arena2 = Shared::new(SharedCell::new(crate::arena::Arena::new(2048))); token_alloc( &arena2, diff --git a/crates/mq-lang/src/module/resolver.rs b/crates/mq-lang/src/module/resolver.rs index 728ba1e7f..5d8d466c9 100644 --- a/crates/mq-lang/src/module/resolver.rs +++ b/crates/mq-lang/src/module/resolver.rs @@ -119,7 +119,7 @@ impl ModuleResolver for DefaultModuleResolver { impl DefaultModuleResolver { /// Creates a new resolver with the given filesystem search paths, backed by - /// [`NativeIo`](crate::io::NativeIo) for local module resolution โ€” i.e. full, + /// [`NativeIo`](crate::io::NativeIo) for local module resolution, i.e. full, /// ungated disk access, matching this resolver's historical behavior. /// /// An empty `paths` slice falls back to the built-in default search directories. @@ -137,7 +137,7 @@ impl DefaultModuleResolver { } /// Creates a new resolver whose local filesystem module resolution goes through `io` - /// instead of a bare [`NativeIo`](crate::io::NativeIo) โ€” e.g. a + /// instead of a bare [`NativeIo`](crate::io::NativeIo), e.g. a /// [`SandboxedIo`](crate::io::SandboxedIo) so `include`/`import` respect the same /// read permission as the `read_file`/`write_file`/`http` builtins. HTTP module /// imports are unaffected (still `NativeIo`-only, if the `http-import-ureq` feature @@ -211,7 +211,7 @@ impl DefaultModuleResolver { } /// When `true`, a URL with no existing `mq.lock` entry is a hard error instead of being - /// recorded as a new entry. See [`http_resolver::UreqFetcher::set_lockfile_frozen`]. + /// recorded as a new entry. See `http_resolver::UreqFetcher::set_lockfile_frozen`. #[cfg(feature = "http-import-ureq")] pub fn set_lockfile_frozen(&mut self, frozen: bool) { self.http_resolver.set_lockfile_frozen(frozen); diff --git a/crates/mq-lang/src/module/resolver/http_import.rs b/crates/mq-lang/src/module/resolver/http_import.rs index 4d6efdbf7..a5d6e3c26 100644 --- a/crates/mq-lang/src/module/resolver/http_import.rs +++ b/crates/mq-lang/src/module/resolver/http_import.rs @@ -254,7 +254,7 @@ mod tests { } #[rstest] - // Single component after github.com/ โ€” not enough to form owner/repo + // Single component after github.com/, not enough to form owner/repo #[case("github.com/owner")] fn test_github_to_raw_url_returns_none(#[case] input: &str) { assert!(github_to_raw_url(input).is_none()); diff --git a/crates/mq-lang/src/module/resolver/http_resolver.rs b/crates/mq-lang/src/module/resolver/http_resolver.rs index 7b0129597..f73f700f8 100644 --- a/crates/mq-lang/src/module/resolver/http_resolver.rs +++ b/crates/mq-lang/src/module/resolver/http_resolver.rs @@ -11,7 +11,7 @@ use std::{borrow::Cow, path::PathBuf}; /// Pluggable HTTP fetch-and-cache backend for [`HttpModuleResolver`]. /// /// Implementations are responsible for both fetching remote content and managing -/// any associated caching (disk, memory, etc.). The URL passed to [`fetch`] has +/// any associated caching (disk, memory, etc.). The URL passed to `fetch` has /// already been normalized and domain-checked by [`HttpModuleResolver`]. pub trait HttpFetcher: Clone + Default { /// Fetch the content at `url`, using any internal cache. @@ -162,9 +162,9 @@ struct CachedModule { /// /// Fetched modules are stored under `{system_cache_dir}/mq/` in one of two subdirectories: /// -/// - `versioned/` โ€” URLs resolved to a specific tag (e.g. `@v0.1.0`); never cleared by +/// - `versioned/`: URLs resolved to a specific tag (e.g. `@v0.1.0`); never cleared by /// [`UreqFetcher::clear_cache`]. -/// - `mutable/` โ€” URLs resolved to `HEAD`, `main`, `master`, or any non-GitHub HTTP URL; +/// - `mutable/`: URLs resolved to `HEAD`, `main`, `master`, or any non-GitHub HTTP URL; /// cleared by [`UreqFetcher::clear_cache`]. /// /// Each cached module is accompanied by a `.mq.sha256` sidecar for tamper detection. @@ -520,7 +520,7 @@ impl HttpModuleResolver { } /// When `true`, a URL with no existing `mq.lock` entry is a hard error instead of being - /// recorded as a new entry. See [`UreqFetcher::set_lockfile_frozen`]. + /// recorded as a new entry. See `UreqFetcher::set_lockfile_frozen`. pub fn set_lockfile_frozen(&mut self, frozen: bool) { self.fetcher.set_lockfile_frozen(frozen); } diff --git a/crates/mq-lang/src/module/resolver/ssrf.rs b/crates/mq-lang/src/module/resolver/ssrf.rs index 36d38201e..f0ce22ebb 100644 --- a/crates/mq-lang/src/module/resolver/ssrf.rs +++ b/crates/mq-lang/src/module/resolver/ssrf.rs @@ -2,9 +2,9 @@ //! crate: HTTP module imports (`http_resolver.rs`) and the `http` builtin //! (`eval/builtin/http.rs`). //! -//! [`is_global_ip`] has no I/O dependencies. [`SsrfSafeResolver`]/[`ssrf_safe_agent`] additionally +//! [`is_global_ip`] has no I/O dependencies. `SsrfSafeResolver`/`ssrf_safe_agent` additionally //! require a concrete `ureq` transport, so they're gated behind `http-import-ureq` (HTTP module -//! imports) or `http` (the `http` builtin) โ€” either one pulls in `ureq`. +//! imports) or `http` (the `http` builtin): either one pulls in `ureq`. /// Returns `true` if `url` uses the `https://` scheme. pub fn is_https(url: &str) -> bool { diff --git a/crates/mq-lang/src/runtime/host.rs b/crates/mq-lang/src/runtime/host.rs index 6bb20aecf..f3e78fac9 100644 --- a/crates/mq-lang/src/runtime/host.rs +++ b/crates/mq-lang/src/runtime/host.rs @@ -28,7 +28,7 @@ impl HostFunctionSyncBound for T {} /// Error returned by a host-registered function, or produced while marshalling arguments and /// return values (see the `ValueAdapter` trait). Carries only a message, so it stays -/// `PartialEq`-comparable and cheap to embed in [`RuntimeError`](crate::error::runtime::RuntimeError). +/// `PartialEq`-comparable and cheap to embed in `RuntimeError`. #[derive(Debug, Clone, PartialEq, Eq)] pub struct HostFunctionError(String); diff --git a/crates/mq-lang/src/runtime/host/adapter.rs b/crates/mq-lang/src/runtime/host/adapter.rs index b2218c6d2..1429639c2 100644 --- a/crates/mq-lang/src/runtime/host/adapter.rs +++ b/crates/mq-lang/src/runtime/host/adapter.rs @@ -116,7 +116,7 @@ impl ValueAdapter for Option { /// Converts a Rust closure into a boxed [`HostFunction`], as the target of /// [`crate::Engine::register_fn`]. `Marker` distinguishes the raw `&[RuntimeValue]` form from -/// each typed arity below so a single closure can only ever match one implementation โ€” hosts +/// each typed arity below so a single closure can only ever match one implementation; hosts /// never need to name `Marker` or this trait themselves. pub trait IntoHostFunction { /// Boxes the closure as a host function. diff --git a/crates/mq-lang/src/runtime/runtime_value.rs b/crates/mq-lang/src/runtime/runtime_value.rs index d5e7ed336..e58296934 100644 --- a/crates/mq-lang/src/runtime/runtime_value.rs +++ b/crates/mq-lang/src/runtime/runtime_value.rs @@ -67,26 +67,26 @@ pub enum RuntimeValue { Boolean(bool), /// A string value. /// - /// Same clone-on-write scheme as [`RuntimeValue::Array`]; see [`string_mut`]. + /// Same clone-on-write scheme as [`RuntimeValue::Array`]; see `string_mut`. String(Shared), /// A symbol (interned identifier). Symbol(Ident), /// An array of runtime values. /// /// Behind [`Shared`] for clone-on-write: cloning is an O(1) refcount bump; mutating - /// builtins must go through [`array_mut`] instead of mutating directly. + /// builtins must go through `array_mut` instead of mutating directly. Array(Shared>), /// A markdown node with an optional selector for indexing. /// - /// Same clone-on-write scheme as [`RuntimeValue::Array`]; see [`markdown_mut`]. + /// Same clone-on-write scheme as [`RuntimeValue::Array`]; see `markdown_mut`. Markdown(Shared, Option), /// A built-in native function identified by name. NativeFunction(Ident), /// A first-class coroutine resumption helper (`next` or `send`). CoroutineBuiltin(ResumeBuiltin), /// A VM closure that has crossed into plain-value territory (stored in an array/dict, - /// passed to `partial`, ...) โ€” see `tarn::value::ClosureValue`. `ClosureValue` is - /// deliberately `pub(crate)` โ€” this variant is constructible only from within the crate. + /// passed to `partial`, ...): see `tarn::value::ClosureValue`. `ClosureValue` is + /// deliberately `pub(crate)`; this variant is constructible only from within the crate. /// /// `Shared`-wrapped, not inline: `ClosureValue` is 64 bytes (chunks/upvalues/bound_args), /// which would otherwise force every `RuntimeValue` variant to that size. @@ -95,11 +95,11 @@ pub enum RuntimeValue { Closure(Shared), /// A dictionary mapping identifiers to runtime values. /// - /// Same clone-on-write scheme as [`RuntimeValue::Array`]; see [`dict_mut`]. + /// Same clone-on-write scheme as [`RuntimeValue::Array`]; see `dict_mut`. Dict(Shared), /// Raw binary data (e.g. CBOR byte strings). /// - /// Same clone-on-write scheme as [`RuntimeValue::Array`]; see [`bytes_mut`]. + /// Same clone-on-write scheme as [`RuntimeValue::Array`]; see `bytes_mut`. Bytes(Shared>), /// A generator function's coroutine, see `tarn::interpreter::coroutine::CoroutineState`. /// `CoroutineState` is deliberately `pub(crate)`, so this variant is constructible only diff --git a/crates/mq-lang/src/tarn/value.rs b/crates/mq-lang/src/tarn/value.rs index 533d2e7b5..0772866dd 100644 --- a/crates/mq-lang/src/tarn/value.rs +++ b/crates/mq-lang/src/tarn/value.rs @@ -87,7 +87,7 @@ fn collect_coroutine_handles(value: &RuntimeValue, handles: &mut Vec) { if let StackValue::Value(value) = value { collect_coroutine_handles(value, handles); diff --git a/crates/mq-lang/tests/integration_tests.rs b/crates/mq-lang/tests/integration_tests.rs index 71aa05ae6..7576d2a8a 100644 --- a/crates/mq-lang/tests/integration_tests.rs +++ b/crates/mq-lang/tests/integration_tests.rs @@ -2841,7 +2841,7 @@ fn to_code_round_trip_preserves_compound_assign_result(mut engine: DefaultEngine #[case::partial_captured_arg("def f(a, b, c): a; | let p = partial(f, 42) | p(99, 1)", vec![RuntimeValue::Number(5.into())], Ok(vec![RuntimeValue::Number(42.into())].into()))] // partial: pre-fill multiple args and verify they combine correctly in the final call #[case::partial_multiple_args("def f(a, b, c): a + b + c; | let p = partial(f, 10, 20) | p(30)", vec![RuntimeValue::Number(5.into())], Ok(vec![RuntimeValue::Number(60.into())].into()))] -// partial: 2-param function can be partially applied โ€” the scenario that triggered the redesign +// partial: 2-param function can be partially applied, the scenario that triggered the redesign #[case::partial_two_param("def plus(a, b): a + b; | let plus10 = partial(plus, 10) | plus10(5)", vec![RuntimeValue::Number(0.into())], Ok(vec![RuntimeValue::Number(15.into())].into()))] // partial: a piped function takes the argument as its pre-filled one, like partial(f, 10) #[case::partial_piped_one_arg("def f(a, b, c): c; | let p = do f | partial(10) end | p(5, 42)", vec![RuntimeValue::Number(0.into())], Ok(vec![RuntimeValue::Number(42.into())].into()))] @@ -2888,7 +2888,7 @@ fn to_code_round_trip_preserves_compound_assign_result(mut engine: DefaultEngine #[case::paren_free_zero_arg_user_fn("def greet(): \"Hello!\"; | greet", vec![RuntimeValue::None], Ok(vec![RuntimeValue::String(Shared::new("Hello!".to_string()))].into()))] // paren-free calls: 1-arg user-defined function called without parentheses uses current value #[case::paren_free_one_arg_user_fn("def double(x): x * 2; | double", vec![RuntimeValue::Number(5.into())], Ok(vec![RuntimeValue::Number(10.into())].into()))] -// paren-free calls: 1-arg function with 1 default param โ€” pipeline value bound to required param +// paren-free calls: 1-arg function with 1 default param, pipeline value bound to required param #[case::paren_free_one_required_one_default("def inc(x, step = 1): x + step; | inc", vec![RuntimeValue::Number(10.into())], Ok(vec![RuntimeValue::Number(11.into())].into()))] // paren-free calls: 1-arg builtin (len) called without parentheses uses the current pipeline value implicitly #[case::paren_free_zero_arg_builtin("compact([1, None, 2]) | len", vec![RuntimeValue::None], Ok(vec![RuntimeValue::Number(2.into())].into()))] @@ -3644,7 +3644,7 @@ fn to_code_round_trip_preserves_compound_assign_result(mut engine: DefaultEngine // base64urld: with Markdown input (decode base64url-encoded heading text) #[case::base64urld_markdown(r#"to_h("dGVzdA", 1) | base64urld | type"#, vec![RuntimeValue::None], Ok(vec![RuntimeValue::String(Shared::new("markdown".to_string()))].into()))] // base64d_bytes/base64urld_bytes: with Markdown input, returns raw bytes (not re-wrapped as a -// markdown node โ€” unlike base64d/base64urld, bytes can't be markdown text content) +// markdown node; unlike base64d/base64urld, bytes can't be markdown text content) #[case::base64d_bytes_markdown(r#"to_h("dGVzdA==", 1) | base64d_bytes | type"#, vec![RuntimeValue::None], Ok(vec![RuntimeValue::String(Shared::new("bytes".to_string()))].into()))] #[case::base64urld_bytes_markdown(r#"to_h("dGVzdA", 1) | base64urld_bytes | type"#, vec![RuntimeValue::None], Ok(vec![RuntimeValue::String(Shared::new("bytes".to_string()))].into()))] // md5/sha256/sha512: with Bytes input (from_hex creates bytes) @@ -4110,7 +4110,7 @@ fn soft_builtin_resolves_inside_array_or_dict_literal(#[case] program: &str, #[c #[rstest] // A module function referenced only inside an array/dict literal must not be pruned from the -// compiled module โ€” `reachable_module_functions` walks call graphs via `collect_referenced_names`. +// compiled module: `reachable_module_functions` walks call graphs via `collect_referenced_names`. #[case::include( r#"include "json" | get([json_stringify({"a": 1})], 0)"#, RuntimeValue::String(Shared::new(r#"{"a": 1}"#.to_string())) diff --git a/crates/mq-lsp/src/folding_range.rs b/crates/mq-lsp/src/folding_range.rs index 353949777..9dbaaab85 100644 --- a/crates/mq-lsp/src/folding_range.rs +++ b/crates/mq-lsp/src/folding_range.rs @@ -2,7 +2,7 @@ use mq_lang::{CstNode, CstNodeKind, CstTrivia, Shared}; use tower_lsp_server::ls_types::{FoldingRange, FoldingRangeKind}; /// Computes folding ranges by parsing the document into a CST and walking it directly, -/// the same approach `signature_help.rs` uses โ€” `mq_hir::Symbol` ranges are too coarse +/// the same approach `signature_help.rs` uses: `mq_hir::Symbol` ranges are too coarse /// (block delimiters like `end`/`;` aren't lowered into HIR at all), but the CST's /// `node_range()` gives an exact span for every block construct. pub(crate) fn response(source_text: Option<&str>) -> Option> { diff --git a/crates/mq-lsp/src/signature_help.rs b/crates/mq-lsp/src/signature_help.rs index e7a8e9c05..05950272b 100644 --- a/crates/mq-lsp/src/signature_help.rs +++ b/crates/mq-lsp/src/signature_help.rs @@ -6,8 +6,8 @@ use url::Url; /// Signature help needs exact call/paren/comma boundaries, which `mq_hir::Symbol` ranges /// don't preserve (a `Call` symbol's range is only its name token; punctuation isn't -/// lowered into HIR at all). So this re-parses the document into a CST โ€” cheap for the -/// small scripts mq targets โ€” and walks it directly instead of going through the HIR. +/// lowered into HIR at all). So this re-parses the document into a CST, cheap for the +/// small scripts mq targets, and walks it directly instead of going through the HIR. pub(crate) fn response( hir: Arc>, url: Url, diff --git a/crates/mq-macros/src/lib.rs b/crates/mq-macros/src/lib.rs index fce47089a..c5911fa5a 100644 --- a/crates/mq-macros/src/lib.rs +++ b/crates/mq-macros/src/lib.rs @@ -15,7 +15,7 @@ use syn::{ /// The static name is derived by uppercasing the `name` attribute value. /// /// # Parameters -/// - `name`: The string name of the builtin (e.g., `"sort_desc"`) โ€” also used as the static name +/// - `name`: The string name of the builtin (e.g., `"sort_desc"`), also used as the static name /// (`SORT_DESC`). /// - `params`: The `ParamNum` variant without the `ParamNum::` prefix (e.g., `None`, `Fixed(1)`, /// `Range(0, 255)`). diff --git a/crates/mq-markdown/src/html_to_markdown/converter.rs b/crates/mq-markdown/src/html_to_markdown/converter.rs index 91169c13d..bb46d9bb9 100644 --- a/crates/mq-markdown/src/html_to_markdown/converter.rs +++ b/crates/mq-markdown/src/html_to_markdown/converter.rs @@ -1294,9 +1294,9 @@ fn collapse_redundant_spaces(text: &str) -> String { /// Returns true if the element is a CSS-only UI widget (dropdown or tab switcher). /// /// Two patterns are detected: -/// 1. A direct child `` with `role="button"` or `aria-haspopup` โ€” used for CSS dropdowns +/// 1. A direct child `` with `role="button"` or `aria-haspopup`, used for CSS dropdowns /// (e.g., Wikipedia's language switcher). -/// 2. All direct children are `` or `