panache-cli 3.12.0__tar.gz → 3.14.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {panache_cli-3.12.0 → panache_cli-3.14.0}/Cargo.lock +37 -37
- {panache_cli-3.12.0 → panache_cli-3.14.0}/Cargo.toml +4 -4
- {panache_cli-3.12.0 → panache_cli-3.14.0}/PKG-INFO +1 -1
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-formatter/CHANGELOG.md +18 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-formatter/Cargo.toml +2 -2
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-formatter/src/formatter/code_blocks.rs +207 -69
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-formatter/src/formatter/inline_layout.rs +10 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-formatter/src/formatter/math/STYLE.md +7 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-formatter/src/formatter/math/lower.rs +39 -17
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-formatter/src/formatter/raw.rs +4 -3
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/CHANGELOG.md +11 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/Cargo.toml +1 -1
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/pandoc_ast.rs +1 -1
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/inlines/links.rs +5 -1
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/config/formatter_presets.rs +31 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/config/types.rs +17 -1
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/external_formatters_common.rs +5 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/external_formatters_sync.rs +56 -25
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/project_index.rs +19 -4
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/quarto_schema/model.rs +121 -1
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/quarto_schema.rs +7 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/rules/undefined_anchor.rs +25 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/lsp/dispatch.rs +2 -1
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/lsp/handlers/completion.rs +229 -2
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/lsp/handlers/diagnostics.rs +41 -7
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/salsa.rs +53 -7
- {panache_cli-3.12.0 → panache_cli-3.14.0}/LICENSE +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/README.md +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/assets/quarto-schema/schema.json +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/build.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-formatter/README.md +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-formatter/src/config.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-formatter/src/directives.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-formatter/src/formatter/blockquotes.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-formatter/src/formatter/blocks.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-formatter/src/formatter/containers.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-formatter/src/formatter/core.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-formatter/src/formatter/document.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-formatter/src/formatter/fenced_divs.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-formatter/src/formatter/hashpipe.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-formatter/src/formatter/headings.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-formatter/src/formatter/indent_utils.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-formatter/src/formatter/inline.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-formatter/src/formatter/lists.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-formatter/src/formatter/math/ir.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-formatter/src/formatter/math/printer.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-formatter/src/formatter/math/render.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-formatter/src/formatter/math.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-formatter/src/formatter/metadata.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-formatter/src/formatter/paragraphs.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-formatter/src/formatter/preserve.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-formatter/src/formatter/sentence_wrap.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-formatter/src/formatter/shortcodes.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-formatter/src/formatter/smart.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-formatter/src/formatter/table_conversion.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-formatter/src/formatter/tables.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-formatter/src/formatter/utils.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-formatter/src/formatter/yaml/STYLE.md +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-formatter/src/formatter/yaml/block_map.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-formatter/src/formatter/yaml/block_sequence.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-formatter/src/formatter/yaml/document.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-formatter/src/formatter/yaml/flow.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-formatter/src/formatter/yaml/options.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-formatter/src/formatter/yaml/scalar.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-formatter/src/formatter/yaml.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-formatter/src/formatter.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-formatter/src/lib.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-formatter/src/parser.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-formatter/src/syntax.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-formatter/src/utils.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-formatter/src/yaml_engine.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/README.md +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/build.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/data/math_symbols.json +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/data/unicode-math.LICENSE +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/data/unicode-math.NOTICE +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/grid_layout.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/lib.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/options.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/block_dispatcher.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/blocks/admonitions.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/blocks/blockquotes.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/blocks/code_blocks.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/blocks/container_prefix.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/blocks/definition_lists.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/blocks/fenced_divs.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/blocks/figures.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/blocks/headings.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/blocks/horizontal_rules.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/blocks/html_blocks.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/blocks/indented_code.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/blocks/latex_envs.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/blocks/line_blocks.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/blocks/lists.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/blocks/metadata.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/blocks/myst_directives.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/blocks/myst_targets.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/blocks/paragraphs.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/blocks/raw_blocks.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/blocks/reference_links.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/blocks/tables.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/blocks/tests/blanklines.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/blocks/tests/blockquotes.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/blocks/tests/code_blocks.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/blocks/tests/content_containers.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/blocks/tests/definition_lists.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/blocks/tests/figures.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/blocks/tests/footnote_marker_line.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/blocks/tests/fragment_context.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/blocks/tests/frame_pinning.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/blocks/tests/headings.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/blocks/tests/helpers.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/blocks/tests/lists.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/blocks/tests/losslessness.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/blocks/tests/metadata_guards.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/blocks/tests/tables.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/blocks.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/core/blockquotes.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/core/definition_lists.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/core/html_interruptions.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/core/list_items.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/core.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/diagnostics.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/inlines/bookdown.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/inlines/bracketed_spans.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/inlines/citations.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/inlines/code_spans.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/inlines/core.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/inlines/emoji.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/inlines/escapes.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/inlines/hard_breaks.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/inlines/inline_executable.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/inlines/inline_footnotes.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/inlines/inline_html.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/inlines/inline_ir.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/inlines/latex.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/inlines/mark.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/inlines/math.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/inlines/myst_roles.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/inlines/myst_substitutions.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/inlines/native_spans.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/inlines/raw_inline.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/inlines/refdef_map.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/inlines/shortcodes.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/inlines/sink.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/inlines/strikeout.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/inlines/subscript.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/inlines/superscript.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/inlines/svelte.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/inlines/tests.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/inlines/uri-schemes.csv +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/inlines/wikilinks.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/inlines.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/math.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/reparse.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/utils/attributes.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/utils/chunk_options.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/utils/container_stack.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/utils/continuation.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/utils/helpers.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/utils/inline_emission.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/utils/list_item_buffer.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/utils/marker_utils.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/utils/text_buffer.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/utils/tree_copy.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/utils/yaml_regions.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/utils.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/verify.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/yaml/cooking.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/yaml/events.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/yaml/model.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/yaml/parser.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/yaml/profile.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/yaml/scanner.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/yaml/validator.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser/yaml.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/parser.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/range_utils.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/semantic/math.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/semantic.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/syntax/alerts.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/syntax/ast.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/syntax/attributes.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/syntax/block_quotes.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/syntax/blocks.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/syntax/chunk_options.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/syntax/citations.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/syntax/code_blocks.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/syntax/code_span.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/syntax/consumer.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/syntax/crossrefs.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/syntax/definitions.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/syntax/fenced_divs.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/syntax/headings.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/syntax/inlines.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/syntax/kind.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/syntax/links.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/syntax/lists.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/syntax/math.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/syntax/myst.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/syntax/raw_tex.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/syntax/references.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/syntax/shortcodes.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/syntax/tables.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/syntax/yaml.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/syntax/yaml_ast.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-parser/src/syntax.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/pyproject.toml +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/bib/bibtex.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/bib/csl_json.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/bib/csl_yaml.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/bib/index.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/bib/preview.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/bib/ris.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/bib.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/bin/distill_quarto_schema.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/cache.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/cli.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/config/types/schema_helpers.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/config.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/diagnostic_renderer.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/directives.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/external_tools_common.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/formatter.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/includes.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/incremental.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/io_context.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/lib.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/code_block_collector.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/diagnostics.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/execution_context.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/external_linters/clippy.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/external_linters/eslint.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/external_linters/jarl.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/external_linters/jolars.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/external_linters/ruff.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/external_linters/shellcheck.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/external_linters/staticcheck.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/external_linters.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/external_linters_sync.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/fuzzy.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/index.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/metadata_diagnostics.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/offsets.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/quarto_schema/distill.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/quarto_schema/interp.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/quarto_schema/report.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/quarto_schema/value.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/rules/adjacent_footnote_refs.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/rules/blank_line_in_display_math.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/rules/blank_line_in_inline_footnote.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/rules/chunk_label_spaces.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/rules/citation_keys.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/rules/citation_nonbreaking_space.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/rules/consumer_divergence.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/rules/crossref_as_link_target.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/rules/duplicate_references.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/rules/duplicate_yaml_anchor.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/rules/emoji_aliases.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/rules/empty_list_item.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/rules/empty_values.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/rules/figure_crossref_captions.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/rules/footnote_after_image.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/rules/footnote_ref_in_footnote_def.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/rules/footnote_swallowed_by_bracket.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/rules/heading_eaten_attrs.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/rules/heading_hierarchy.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/rules/heading_strip_comments_residue.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/rules/html_entities.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/rules/inline_math_line_break.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/rules/link_text_is_url.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/rules/math_content.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/rules/missing_chunk_labels.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/rules/quarto_schema.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/rules/reversed_footnote_marker.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/rules/stray_fenced_div_markers.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/rules/swallowed_list_marker.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/rules/table_column_count.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/rules/undefined_references.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/rules/unspaced_citation.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/rules/unspaced_list_marker.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/rules/unsupported_metadata_key.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/rules/unused_definitions.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/rules/unused_yaml_anchor.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/rules.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/runner.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/yaml_anchors.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter/yaml_resolve.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/linter.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/lsp/config.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/lsp/context.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/lsp/conversions.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/lsp/documents.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/lsp/global_state.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/lsp/handlers/code_actions.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/lsp/handlers/configuration.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/lsp/handlers/document_highlight.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/lsp/handlers/document_links.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/lsp/handlers/document_symbols.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/lsp/handlers/file_operations.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/lsp/handlers/file_rename.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/lsp/handlers/file_watcher.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/lsp/handlers/folding_ranges.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/lsp/handlers/footnote_conversion.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/lsp/handlers/formatting.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/lsp/handlers/goto_definition.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/lsp/handlers/heading_link_conversion.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/lsp/handlers/hover.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/lsp/handlers/link_conversion.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/lsp/handlers/linked_editing_range.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/lsp/handlers/list_conversion.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/lsp/handlers/prepare_rename.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/lsp/handlers/references.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/lsp/handlers/rename.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/lsp/handlers/semantic_tokens.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/lsp/handlers/shortcode_args.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/lsp/handlers/table_conversion.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/lsp/handlers/workspace_folders.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/lsp/handlers/workspace_symbols.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/lsp/handlers.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/lsp/helpers.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/lsp/line_index.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/lsp/navigation.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/lsp/symbols.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/lsp/task_pool.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/lsp/testing.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/lsp/uri_ext.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/lsp.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/main.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/metadata/bibliography.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/metadata/citations.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/metadata/project.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/metadata/references.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/metadata/yaml.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/metadata.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/parser.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/range_utils.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/syntax.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/utils.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/vfs.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/yaml_engine.rs +0 -0
- {panache_cli-3.12.0 → panache_cli-3.14.0}/src/yaml_regions.rs +0 -0
|
@@ -954,9 +954,9 @@ dependencies = [
|
|
|
954
954
|
|
|
955
955
|
[[package]]
|
|
956
956
|
name = "js-sys"
|
|
957
|
-
version = "0.3.
|
|
957
|
+
version = "0.3.106"
|
|
958
958
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
959
|
-
checksum = "
|
|
959
|
+
checksum = "7883d941dae510fb2d978fc3fe018c71c9e2892fd38854de3e8b92c2e5ad9cc5"
|
|
960
960
|
dependencies = [
|
|
961
961
|
"cfg-if",
|
|
962
962
|
"futures-util",
|
|
@@ -1017,9 +1017,9 @@ dependencies = [
|
|
|
1017
1017
|
|
|
1018
1018
|
[[package]]
|
|
1019
1019
|
name = "lazy_static"
|
|
1020
|
-
version = "1.5.
|
|
1020
|
+
version = "1.5.1"
|
|
1021
1021
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1022
|
-
checksum = "
|
|
1022
|
+
checksum = "20870f649af7073d53e38067b2a84312175d56ea15217e1b15bc83506ec50afb"
|
|
1023
1023
|
|
|
1024
1024
|
[[package]]
|
|
1025
1025
|
name = "libc"
|
|
@@ -1240,7 +1240,7 @@ checksum = "1a80800c0488c3a21695ea981a54918fbb37abf04f4d0720c453632255e2ff0e"
|
|
|
1240
1240
|
|
|
1241
1241
|
[[package]]
|
|
1242
1242
|
name = "panache"
|
|
1243
|
-
version = "3.
|
|
1243
|
+
version = "3.14.0"
|
|
1244
1244
|
dependencies = [
|
|
1245
1245
|
"annotate-snippets",
|
|
1246
1246
|
"assert_cmd",
|
|
@@ -1285,7 +1285,7 @@ dependencies = [
|
|
|
1285
1285
|
|
|
1286
1286
|
[[package]]
|
|
1287
1287
|
name = "panache-formatter"
|
|
1288
|
-
version = "0.
|
|
1288
|
+
version = "0.26.1"
|
|
1289
1289
|
dependencies = [
|
|
1290
1290
|
"badness-formatter",
|
|
1291
1291
|
"insta",
|
|
@@ -1305,7 +1305,7 @@ dependencies = [
|
|
|
1305
1305
|
|
|
1306
1306
|
[[package]]
|
|
1307
1307
|
name = "panache-parser"
|
|
1308
|
-
version = "0.
|
|
1308
|
+
version = "0.31.1"
|
|
1309
1309
|
dependencies = [
|
|
1310
1310
|
"badness-parser",
|
|
1311
1311
|
"entities",
|
|
@@ -1704,9 +1704,9 @@ checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f"
|
|
|
1704
1704
|
|
|
1705
1705
|
[[package]]
|
|
1706
1706
|
name = "salsa"
|
|
1707
|
-
version = "0.28.
|
|
1707
|
+
version = "0.28.5"
|
|
1708
1708
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1709
|
-
checksum = "
|
|
1709
|
+
checksum = "27d2e6e19e39591cd99c01ac4141544b4d012cfd0831348629b8187fa9fe6d34"
|
|
1710
1710
|
dependencies = [
|
|
1711
1711
|
"boxcar",
|
|
1712
1712
|
"crossbeam-queue",
|
|
@@ -1730,15 +1730,15 @@ dependencies = [
|
|
|
1730
1730
|
|
|
1731
1731
|
[[package]]
|
|
1732
1732
|
name = "salsa-macro-rules"
|
|
1733
|
-
version = "0.28.
|
|
1733
|
+
version = "0.28.5"
|
|
1734
1734
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1735
|
-
checksum = "
|
|
1735
|
+
checksum = "baf90a551c38f25ed8489111d3d5827aa18e1b85963f5e6a298505b1d1e2cb7e"
|
|
1736
1736
|
|
|
1737
1737
|
[[package]]
|
|
1738
1738
|
name = "salsa-macros"
|
|
1739
|
-
version = "0.28.
|
|
1739
|
+
version = "0.28.5"
|
|
1740
1740
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1741
|
-
checksum = "
|
|
1741
|
+
checksum = "69dd77f86ec10e72e314f4ddf7c44c8d349e73cdff1aad524ba9668603fb0549"
|
|
1742
1742
|
dependencies = [
|
|
1743
1743
|
"proc-macro2",
|
|
1744
1744
|
"quote",
|
|
@@ -1893,9 +1893,9 @@ dependencies = [
|
|
|
1893
1893
|
|
|
1894
1894
|
[[package]]
|
|
1895
1895
|
name = "siphasher"
|
|
1896
|
-
version = "1.0.
|
|
1896
|
+
version = "1.0.4"
|
|
1897
1897
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1898
|
-
checksum = "
|
|
1898
|
+
checksum = "33f4fe9184a62d842c9ef383018f3306d8ba224fd9d836f56d7288308847c256"
|
|
1899
1899
|
|
|
1900
1900
|
[[package]]
|
|
1901
1901
|
name = "slab"
|
|
@@ -1905,9 +1905,9 @@ checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5"
|
|
|
1905
1905
|
|
|
1906
1906
|
[[package]]
|
|
1907
1907
|
name = "smallvec"
|
|
1908
|
-
version = "1.16.
|
|
1908
|
+
version = "1.16.2"
|
|
1909
1909
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1910
|
-
checksum = "
|
|
1910
|
+
checksum = "f9395f0f0eee849a9b707b2f06bb92a6a422090e2123bb2ef8e87a0e61892a8e"
|
|
1911
1911
|
|
|
1912
1912
|
[[package]]
|
|
1913
1913
|
name = "smol_str"
|
|
@@ -2018,18 +2018,18 @@ checksum = "4568d7e143ec86d2021c338bae2afa88699e84b8e0af523626654fe6f03a1748"
|
|
|
2018
2018
|
|
|
2019
2019
|
[[package]]
|
|
2020
2020
|
name = "thiserror"
|
|
2021
|
-
version = "2.0.
|
|
2021
|
+
version = "2.0.21"
|
|
2022
2022
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2023
|
-
checksum = "
|
|
2023
|
+
checksum = "09e52cb86a36cede5cb101bf8908837b3e4c6e5e59fe7fd85c23fb56200d189e"
|
|
2024
2024
|
dependencies = [
|
|
2025
2025
|
"thiserror-impl",
|
|
2026
2026
|
]
|
|
2027
2027
|
|
|
2028
2028
|
[[package]]
|
|
2029
2029
|
name = "thiserror-impl"
|
|
2030
|
-
version = "2.0.
|
|
2030
|
+
version = "2.0.21"
|
|
2031
2031
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2032
|
-
checksum = "
|
|
2032
|
+
checksum = "fe5197923287db20a58125f0bc85c062f7f2c892de97b18c356f9efb14b28524"
|
|
2033
2033
|
dependencies = [
|
|
2034
2034
|
"proc-macro2",
|
|
2035
2035
|
"quote",
|
|
@@ -2215,9 +2215,9 @@ dependencies = [
|
|
|
2215
2215
|
|
|
2216
2216
|
[[package]]
|
|
2217
2217
|
name = "wasm-bindgen"
|
|
2218
|
-
version = "0.2.
|
|
2218
|
+
version = "0.2.129"
|
|
2219
2219
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2220
|
-
checksum = "
|
|
2220
|
+
checksum = "9bb54f33acc68fd454578d9820b0bde1a1a3d17aa17bb7b6595806d02886d409"
|
|
2221
2221
|
dependencies = [
|
|
2222
2222
|
"cfg-if",
|
|
2223
2223
|
"once_cell",
|
|
@@ -2228,9 +2228,9 @@ dependencies = [
|
|
|
2228
2228
|
|
|
2229
2229
|
[[package]]
|
|
2230
2230
|
name = "wasm-bindgen-macro"
|
|
2231
|
-
version = "0.2.
|
|
2231
|
+
version = "0.2.129"
|
|
2232
2232
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2233
|
-
checksum = "
|
|
2233
|
+
checksum = "2e29d0c35b16e224a7eeb5cd2d25e3e1968fbd65604117b44d3b789d00ee8535"
|
|
2234
2234
|
dependencies = [
|
|
2235
2235
|
"quote",
|
|
2236
2236
|
"wasm-bindgen-macro-support",
|
|
@@ -2238,9 +2238,9 @@ dependencies = [
|
|
|
2238
2238
|
|
|
2239
2239
|
[[package]]
|
|
2240
2240
|
name = "wasm-bindgen-macro-support"
|
|
2241
|
-
version = "0.2.
|
|
2241
|
+
version = "0.2.129"
|
|
2242
2242
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2243
|
-
checksum = "
|
|
2243
|
+
checksum = "6f501a8bc3719dba86ef8ae4728879c08001bea749eb1333ac5b91e040e2a6b7"
|
|
2244
2244
|
dependencies = [
|
|
2245
2245
|
"bumpalo",
|
|
2246
2246
|
"proc-macro2",
|
|
@@ -2251,9 +2251,9 @@ dependencies = [
|
|
|
2251
2251
|
|
|
2252
2252
|
[[package]]
|
|
2253
2253
|
name = "wasm-bindgen-shared"
|
|
2254
|
-
version = "0.2.
|
|
2254
|
+
version = "0.2.129"
|
|
2255
2255
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2256
|
-
checksum = "
|
|
2256
|
+
checksum = "23f0c9c52aa7cd7d77769a4cfe2a9adb1b331f489a41d912ce14513d5ab995c6"
|
|
2257
2257
|
dependencies = [
|
|
2258
2258
|
"unicode-ident",
|
|
2259
2259
|
]
|
|
@@ -2278,9 +2278,9 @@ dependencies = [
|
|
|
2278
2278
|
|
|
2279
2279
|
[[package]]
|
|
2280
2280
|
name = "wincode"
|
|
2281
|
-
version = "0.6.
|
|
2281
|
+
version = "0.6.2"
|
|
2282
2282
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2283
|
-
checksum = "
|
|
2283
|
+
checksum = "1d4abae4bfc30e59d97d3ea4924e5c5e7fede946390bffbd52c076c081b87a6c"
|
|
2284
2284
|
dependencies = [
|
|
2285
2285
|
"pastey",
|
|
2286
2286
|
"proc-macro2",
|
|
@@ -2366,9 +2366,9 @@ dependencies = [
|
|
|
2366
2366
|
|
|
2367
2367
|
[[package]]
|
|
2368
2368
|
name = "yoke-derive"
|
|
2369
|
-
version = "0.8.
|
|
2369
|
+
version = "0.8.4"
|
|
2370
2370
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2371
|
-
checksum = "
|
|
2371
|
+
checksum = "ec8ebde2db3681e8c9980cc27822030e68752690ddfa9473e739aeb4dbde6d71"
|
|
2372
2372
|
dependencies = [
|
|
2373
2373
|
"proc-macro2",
|
|
2374
2374
|
"quote",
|
|
@@ -2378,18 +2378,18 @@ dependencies = [
|
|
|
2378
2378
|
|
|
2379
2379
|
[[package]]
|
|
2380
2380
|
name = "zerocopy"
|
|
2381
|
-
version = "0.8.
|
|
2381
|
+
version = "0.8.59"
|
|
2382
2382
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2383
|
-
checksum = "
|
|
2383
|
+
checksum = "6df92bf3d9227be3d53173901ddbffac2babc27ae50f397776ffd6dc33f800cb"
|
|
2384
2384
|
dependencies = [
|
|
2385
2385
|
"zerocopy-derive",
|
|
2386
2386
|
]
|
|
2387
2387
|
|
|
2388
2388
|
[[package]]
|
|
2389
2389
|
name = "zerocopy-derive"
|
|
2390
|
-
version = "0.8.
|
|
2390
|
+
version = "0.8.59"
|
|
2391
2391
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2392
|
-
checksum = "
|
|
2392
|
+
checksum = "ac4f328cf2f05d084e496c3e9c3f33ed0a183656a16e1fcec4d464d8373aec82"
|
|
2393
2393
|
dependencies = [
|
|
2394
2394
|
"proc-macro2",
|
|
2395
2395
|
"quote",
|
|
@@ -9,7 +9,7 @@ authors = ["Johan Larsson <johan@jolars.co>"]
|
|
|
9
9
|
|
|
10
10
|
[package]
|
|
11
11
|
name = "panache"
|
|
12
|
-
version = "3.
|
|
12
|
+
version = "3.14.0"
|
|
13
13
|
edition.workspace = true
|
|
14
14
|
rust-version.workspace = true
|
|
15
15
|
# `distill_quarto_schema` is a dev-only vendoring bin (src/bin/); keep bare
|
|
@@ -55,11 +55,11 @@ path = "src/main.rs"
|
|
|
55
55
|
required-features = ["cli"]
|
|
56
56
|
|
|
57
57
|
[dependencies]
|
|
58
|
-
panache-formatter = { path = "crates/panache-formatter", version = "0.
|
|
58
|
+
panache-formatter = { path = "crates/panache-formatter", version = "0.26.1", features = [
|
|
59
59
|
"serde",
|
|
60
60
|
"schema",
|
|
61
61
|
] }
|
|
62
|
-
panache-parser = { path = "crates/panache-parser", version = "0.
|
|
62
|
+
panache-parser = { path = "crates/panache-parser", version = "0.31.1", features = [
|
|
63
63
|
"serde",
|
|
64
64
|
"schema",
|
|
65
65
|
] }
|
|
@@ -80,7 +80,7 @@ num_cpus = { version = "1.17.0", optional = true }
|
|
|
80
80
|
percent-encoding = { version = "2.3.2", optional = true }
|
|
81
81
|
regex = "1.12.2"
|
|
82
82
|
rowan = "0.17.0"
|
|
83
|
-
salsa = "0.28.
|
|
83
|
+
salsa = "0.28.5"
|
|
84
84
|
serde = { version = "1.0.228", features = ["derive"] }
|
|
85
85
|
serde_json = "1.0.150"
|
|
86
86
|
schemars = "1.2.1"
|
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.26.1](https://github.com/jolars/panache/compare/panache-formatter-v0.26.0...panache-formatter-v0.26.1) (2026-10-02)
|
|
4
|
+
|
|
5
|
+
### Dependencies
|
|
6
|
+
|
|
7
|
+
- updated crates/panache-parser to v0.31.1
|
|
8
|
+
|
|
9
|
+
## [0.26.0](https://github.com/jolars/panache/compare/panache-formatter-v0.25.0...panache-formatter-v0.26.0) (2026-09-30)
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
- support code style metadata ([`88dcc1e`](https://github.com/jolars/panache/commit/88dcc1eba4ea6801c0d4a726e86bf55417333977))
|
|
13
|
+
- **lsp:** complete reference link labels ([`035a8b3`](https://github.com/jolars/panache/commit/035a8b3b65dc8bef0c8c4b5bcebb673ecc469f3a))
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
- **formatter:** preserve leading math sign spacing ([`7f3d427`](https://github.com/jolars/panache/commit/7f3d427772d19b66bee1a098af49c5ad91be5d76))
|
|
17
|
+
|
|
18
|
+
### Dependencies
|
|
19
|
+
- updated crates/panache-parser to v0.31.0
|
|
20
|
+
|
|
3
21
|
## [0.25.0](https://github.com/jolars/panache/compare/panache-formatter-v0.24.2...panache-formatter-v0.25.0) (2026-09-22)
|
|
4
22
|
|
|
5
23
|
### Features
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "panache-formatter"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.26.1"
|
|
4
4
|
edition.workspace = true
|
|
5
5
|
rust-version.workspace = true
|
|
6
6
|
include = [
|
|
@@ -19,7 +19,7 @@ keywords = ["quarto", "pandoc", "markdown", "formatter"]
|
|
|
19
19
|
categories = ["text-processing"]
|
|
20
20
|
|
|
21
21
|
[dependencies]
|
|
22
|
-
panache-parser = { path = "../panache-parser", version = "0.
|
|
22
|
+
panache-parser = { path = "../panache-parser", version = "0.31.1" }
|
|
23
23
|
log = { version = "0.4.31", features = ["release_max_level_debug"] }
|
|
24
24
|
rowan = "0.17.0"
|
|
25
25
|
serde = { version = "1.0.228", features = ["derive"], optional = true }
|
{panache_cli-3.12.0 → panache_cli-3.14.0}/crates/panache-formatter/src/formatter/code_blocks.rs
RENAMED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
use crate::config::{Config, Flavor};
|
|
2
|
-
use crate::syntax::{
|
|
2
|
+
use crate::syntax::{
|
|
3
|
+
AstNode, CellOptionResolution, CodeBlock, SyntaxKind, SyntaxNode, YamlMetadata, YamlNode,
|
|
4
|
+
parse_yaml_document,
|
|
5
|
+
};
|
|
3
6
|
use panache_parser::parser::blocks::code_blocks::{CodeBlockType, InfoString};
|
|
4
7
|
use rowan::NodeOrToken;
|
|
5
|
-
use std::collections::HashMap;
|
|
8
|
+
use std::collections::{BTreeMap, HashMap};
|
|
6
9
|
|
|
7
10
|
use super::Formatter;
|
|
8
11
|
use super::hashpipe;
|
|
@@ -21,14 +24,16 @@ impl Formatter {
|
|
|
21
24
|
}
|
|
22
25
|
}
|
|
23
26
|
|
|
24
|
-
pub type FormattedCodeMap = HashMap<
|
|
27
|
+
pub type FormattedCodeMap = HashMap<usize, String>;
|
|
25
28
|
|
|
26
29
|
#[derive(Debug, Clone)]
|
|
27
30
|
pub struct ExternalCodeBlock {
|
|
31
|
+
pub offset: usize,
|
|
28
32
|
pub language: String,
|
|
29
33
|
pub original: String,
|
|
30
34
|
pub formatter_input: String,
|
|
31
35
|
pub hashpipe_prefix: Option<String>,
|
|
36
|
+
pub code_style: BTreeMap<String, String>,
|
|
32
37
|
}
|
|
33
38
|
|
|
34
39
|
/// Format a code block, normalizing fence markers and attributes based on config
|
|
@@ -43,15 +48,9 @@ pub(super) fn format_code_block(
|
|
|
43
48
|
return;
|
|
44
49
|
}
|
|
45
50
|
|
|
46
|
-
let (info_node,
|
|
51
|
+
let (info_node, _, extracted_content) = extract_code_block_parts(node);
|
|
47
52
|
let mut content = extracted_content;
|
|
48
|
-
let
|
|
49
|
-
|
|
50
|
-
if let Some(formatted) = formatted_code.get(&(language_key.clone(), content.clone())) {
|
|
51
|
-
content = expand_tabs_with_width(formatted, config.tab_width);
|
|
52
|
-
} else if let Some(raw_content) = extract_raw_code_block_content(node)
|
|
53
|
-
&& let Some(formatted) = formatted_code.get(&(language_key, raw_content))
|
|
54
|
-
{
|
|
53
|
+
if let Some(formatted) = formatted_code.get(&usize::from(node.text_range().start())) {
|
|
55
54
|
content = expand_tabs_with_width(formatted, config.tab_width);
|
|
56
55
|
}
|
|
57
56
|
|
|
@@ -131,12 +130,6 @@ fn is_unclosed_fenced_code_block(node: &SyntaxNode) -> bool {
|
|
|
131
130
|
has_open && !has_close
|
|
132
131
|
}
|
|
133
132
|
|
|
134
|
-
fn extract_raw_code_block_content(node: &SyntaxNode) -> Option<String> {
|
|
135
|
-
node.children()
|
|
136
|
-
.find(|child| child.kind() == SyntaxKind::CODE_CONTENT)
|
|
137
|
-
.map(|child| child.text().to_string())
|
|
138
|
-
}
|
|
139
|
-
|
|
140
133
|
fn expand_tabs_with_width(text: &str, tab_width: usize) -> String {
|
|
141
134
|
let mut out = String::with_capacity(text.len());
|
|
142
135
|
let mut col = 0usize;
|
|
@@ -784,15 +777,14 @@ pub(crate) fn extract_myst_directive_parts(node: &SyntaxNode) -> Option<(String,
|
|
|
784
777
|
body.map(|body| (language, body))
|
|
785
778
|
}
|
|
786
779
|
|
|
787
|
-
/// Collect all code blocks and their info strings from the syntax tree.
|
|
788
780
|
/// Collect all code blocks from the syntax tree for external formatting.
|
|
789
|
-
/// Returns a flat list of (language, content) pairs.
|
|
790
781
|
pub fn collect_code_blocks(
|
|
791
782
|
tree: &SyntaxNode,
|
|
792
783
|
_input: &str,
|
|
793
784
|
config: &Config,
|
|
794
785
|
) -> Vec<ExternalCodeBlock> {
|
|
795
786
|
let mut result = Vec::new();
|
|
787
|
+
let document_code_style = document_code_style(tree);
|
|
796
788
|
for node in tree.descendants() {
|
|
797
789
|
if node.kind() == SyntaxKind::MYST_DIRECTIVE {
|
|
798
790
|
if let Some((language, content)) = extract_myst_directive_parts(&node) {
|
|
@@ -803,10 +795,12 @@ pub fn collect_code_blocks(
|
|
|
803
795
|
continue;
|
|
804
796
|
}
|
|
805
797
|
result.push(ExternalCodeBlock {
|
|
798
|
+
offset: usize::from(node.text_range().start()),
|
|
806
799
|
language,
|
|
807
800
|
original: content.clone(),
|
|
808
801
|
formatter_input: content,
|
|
809
802
|
hashpipe_prefix: None,
|
|
803
|
+
code_style: document_code_style.clone(),
|
|
810
804
|
});
|
|
811
805
|
}
|
|
812
806
|
continue;
|
|
@@ -826,9 +820,9 @@ pub fn collect_code_blocks(
|
|
|
826
820
|
.map(|n| InfoString::parse(&n.text().to_string()))
|
|
827
821
|
.unwrap_or_else(|| InfoString::parse(""));
|
|
828
822
|
|
|
829
|
-
let language = language.unwrap_or_else(|| match info.block_type {
|
|
823
|
+
let language = language.unwrap_or_else(|| match &info.block_type {
|
|
830
824
|
CodeBlockType::DisplayShortcut { language }
|
|
831
|
-
| CodeBlockType::Executable { language } => language,
|
|
825
|
+
| CodeBlockType::Executable { language } => language.clone(),
|
|
832
826
|
CodeBlockType::DisplayExplicit { classes } => {
|
|
833
827
|
classes.first().cloned().unwrap_or_default()
|
|
834
828
|
}
|
|
@@ -839,75 +833,219 @@ pub fn collect_code_blocks(
|
|
|
839
833
|
continue;
|
|
840
834
|
}
|
|
841
835
|
|
|
836
|
+
let mut code_style = document_code_style.clone();
|
|
837
|
+
code_style.extend(code_style_options(&node, &info));
|
|
838
|
+
let (formatter_input, hashpipe_prefix) =
|
|
839
|
+
if matches!(config.flavor, Flavor::Quarto | Flavor::RMarkdown)
|
|
840
|
+
&& matches!(info.block_type, CodeBlockType::Executable { .. })
|
|
841
|
+
&& hashpipe::get_comment_prefix(&language).is_some()
|
|
842
|
+
{
|
|
843
|
+
split_hashpipe_header(&content, &node)
|
|
844
|
+
.map(|(header, body)| (body, Some(header)))
|
|
845
|
+
.unwrap_or_else(|| (content.clone(), None))
|
|
846
|
+
} else {
|
|
847
|
+
(content.clone(), None)
|
|
848
|
+
};
|
|
849
|
+
|
|
842
850
|
result.push(ExternalCodeBlock {
|
|
851
|
+
offset: usize::from(node.text_range().start()),
|
|
843
852
|
language,
|
|
844
|
-
original: content
|
|
845
|
-
formatter_input
|
|
846
|
-
hashpipe_prefix
|
|
853
|
+
original: content,
|
|
854
|
+
formatter_input,
|
|
855
|
+
hashpipe_prefix,
|
|
856
|
+
code_style,
|
|
847
857
|
});
|
|
848
858
|
}
|
|
849
859
|
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
}
|
|
860
|
+
result
|
|
861
|
+
}
|
|
853
862
|
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
863
|
+
fn document_code_style(tree: &SyntaxNode) -> BTreeMap<String, String> {
|
|
864
|
+
tree.children()
|
|
865
|
+
.filter_map(YamlMetadata::cast)
|
|
866
|
+
.filter_map(|metadata| metadata.document())
|
|
867
|
+
.filter_map(|document| document.block_map())
|
|
868
|
+
.flat_map(|mapping| mapping.entries())
|
|
869
|
+
.filter(|entry| entry.key_text().as_deref() == Some("code-style"))
|
|
870
|
+
.map(|entry| {
|
|
871
|
+
entry
|
|
872
|
+
.value()
|
|
873
|
+
.and_then(|value| value.as_node())
|
|
874
|
+
.map(|value| code_style_map(&value))
|
|
875
|
+
.unwrap_or_default()
|
|
876
|
+
})
|
|
877
|
+
.last()
|
|
878
|
+
.unwrap_or_default()
|
|
879
|
+
}
|
|
858
880
|
|
|
859
|
-
|
|
860
|
-
|
|
881
|
+
fn code_style_options(node: &SyntaxNode, info: &InfoString) -> BTreeMap<String, String> {
|
|
882
|
+
if let Some(cell) = CodeBlock::cast(node.clone()).and_then(|block| block.executable_cell()) {
|
|
883
|
+
for option in cell.resolved_options() {
|
|
884
|
+
if option.key() != "code-style" {
|
|
861
885
|
continue;
|
|
862
886
|
}
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
887
|
+
if let CellOptionResolution::Resolved(declaration) = option.resolution() {
|
|
888
|
+
if let Some(value) = declaration.yaml_value() {
|
|
889
|
+
return code_style_map(value);
|
|
890
|
+
}
|
|
891
|
+
if let Some(value) = declaration.cooked_value() {
|
|
892
|
+
return parse_code_style_map(value);
|
|
893
|
+
}
|
|
867
894
|
}
|
|
895
|
+
return BTreeMap::new();
|
|
896
|
+
}
|
|
897
|
+
}
|
|
868
898
|
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
899
|
+
info.attributes
|
|
900
|
+
.iter()
|
|
901
|
+
.find(|(key, _)| key == "code-style")
|
|
902
|
+
.and_then(|(_, value)| value.as_deref())
|
|
903
|
+
.map(parse_code_style_map)
|
|
904
|
+
.unwrap_or_default()
|
|
905
|
+
}
|
|
873
906
|
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
907
|
+
fn parse_code_style_map(value: &str) -> BTreeMap<String, String> {
|
|
908
|
+
parse_yaml_document(value)
|
|
909
|
+
.and_then(|document| document.as_node())
|
|
910
|
+
.map(|node| code_style_map(&node))
|
|
911
|
+
.unwrap_or_default()
|
|
912
|
+
}
|
|
880
913
|
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
914
|
+
fn code_style_map(value: &YamlNode) -> BTreeMap<String, String> {
|
|
915
|
+
let entries: Vec<(Option<String>, Option<String>)> = match value {
|
|
916
|
+
YamlNode::BlockMap(map) => map
|
|
917
|
+
.entries()
|
|
918
|
+
.map(|entry| {
|
|
919
|
+
(
|
|
920
|
+
entry.key_text(),
|
|
921
|
+
entry
|
|
922
|
+
.value()
|
|
923
|
+
.and_then(|value| value.as_scalar())
|
|
924
|
+
.map(|value| value.value()),
|
|
925
|
+
)
|
|
926
|
+
})
|
|
927
|
+
.collect(),
|
|
928
|
+
YamlNode::FlowMap(map) => map
|
|
929
|
+
.entries()
|
|
930
|
+
.map(|entry| {
|
|
931
|
+
(
|
|
932
|
+
entry.key_text(),
|
|
933
|
+
entry
|
|
934
|
+
.value()
|
|
935
|
+
.and_then(|value| value.as_scalar())
|
|
936
|
+
.map(|value| value.value()),
|
|
937
|
+
)
|
|
938
|
+
})
|
|
939
|
+
.collect(),
|
|
940
|
+
_ => return BTreeMap::new(),
|
|
941
|
+
};
|
|
885
942
|
|
|
886
|
-
|
|
887
|
-
|
|
943
|
+
entries
|
|
944
|
+
.into_iter()
|
|
945
|
+
.filter_map(|(key, value)| {
|
|
946
|
+
let (key, value) = (key?, value?);
|
|
947
|
+
let key = key.trim().to_ascii_lowercase().replace('_', "-");
|
|
948
|
+
if matches!(key.as_str(), "line-width" | "indent-width")
|
|
949
|
+
&& value
|
|
950
|
+
.parse::<usize>()
|
|
951
|
+
.ok()
|
|
952
|
+
.filter(|width| *width > 0)
|
|
953
|
+
.is_none()
|
|
888
954
|
{
|
|
889
|
-
|
|
890
|
-
prefix = Some(header);
|
|
955
|
+
return None;
|
|
891
956
|
}
|
|
892
|
-
|
|
893
|
-
}
|
|
894
|
-
|
|
895
|
-
updated.push(ExternalCodeBlock {
|
|
896
|
-
language: block.language,
|
|
897
|
-
original: block.original,
|
|
898
|
-
formatter_input,
|
|
899
|
-
hashpipe_prefix: prefix,
|
|
900
|
-
});
|
|
901
|
-
}
|
|
902
|
-
|
|
903
|
-
updated
|
|
957
|
+
Some((key, value))
|
|
958
|
+
})
|
|
959
|
+
.collect()
|
|
904
960
|
}
|
|
905
961
|
|
|
906
962
|
#[cfg(test)]
|
|
907
963
|
mod tests {
|
|
908
|
-
use super::split_hashpipe_header;
|
|
909
|
-
use crate::config::{Extensions, Flavor, ParserOptions};
|
|
964
|
+
use super::{collect_code_blocks, split_hashpipe_header};
|
|
965
|
+
use crate::config::{Config, Extensions, Flavor, ParserOptions};
|
|
910
966
|
use crate::syntax::SyntaxKind;
|
|
967
|
+
use std::collections::BTreeMap;
|
|
968
|
+
|
|
969
|
+
#[test]
|
|
970
|
+
fn document_code_style_defaults_merge_with_each_block() {
|
|
971
|
+
let input = "---\ncode-style:\n line-width: 40\n indent-width: 2\n---\n\n```{r}\nx <- 1\n```\n\n```{r}\n#| code-style: {line-width: 80}\n\nx <- 2\n```\n\n```{.r code-style=\"{indent-width: 4}\"}\nx <- 3\n```\n";
|
|
972
|
+
let config = Config {
|
|
973
|
+
flavor: Flavor::Quarto,
|
|
974
|
+
parser_extensions: Extensions::for_flavor(Flavor::Quarto),
|
|
975
|
+
..Default::default()
|
|
976
|
+
};
|
|
977
|
+
let tree = crate::parser::parse(
|
|
978
|
+
input,
|
|
979
|
+
Some(ParserOptions {
|
|
980
|
+
flavor: config.flavor,
|
|
981
|
+
extensions: config.parser_extensions.clone(),
|
|
982
|
+
..Default::default()
|
|
983
|
+
}),
|
|
984
|
+
);
|
|
985
|
+
|
|
986
|
+
let blocks = collect_code_blocks(&tree, input, &config);
|
|
987
|
+
assert_eq!(blocks.len(), 3);
|
|
988
|
+
assert_eq!(
|
|
989
|
+
blocks[0].code_style,
|
|
990
|
+
BTreeMap::from([
|
|
991
|
+
("line-width".to_string(), "40".to_string()),
|
|
992
|
+
("indent-width".to_string(), "2".to_string()),
|
|
993
|
+
])
|
|
994
|
+
);
|
|
995
|
+
assert_eq!(blocks[1].code_style["line-width"], "80");
|
|
996
|
+
assert_eq!(blocks[1].code_style["indent-width"], "2");
|
|
997
|
+
assert_eq!(blocks[2].code_style["line-width"], "40");
|
|
998
|
+
assert_eq!(blocks[2].code_style["indent-width"], "4");
|
|
999
|
+
}
|
|
1000
|
+
|
|
1001
|
+
#[test]
|
|
1002
|
+
fn last_document_code_style_field_applies_to_every_block() {
|
|
1003
|
+
let input = "---\ncode-style:\n line-width: 40\n indent-width: 2\n---\n\n```r\nx <- 1\n```\n\n---\ncode-style:\n line-width: 80\n---\n\n```r\nx <- 2\n```\n";
|
|
1004
|
+
let config = Config {
|
|
1005
|
+
flavor: Flavor::Pandoc,
|
|
1006
|
+
parser_extensions: Extensions::for_flavor(Flavor::Pandoc),
|
|
1007
|
+
..Default::default()
|
|
1008
|
+
};
|
|
1009
|
+
let tree = crate::parser::parse(
|
|
1010
|
+
input,
|
|
1011
|
+
Some(ParserOptions {
|
|
1012
|
+
flavor: config.flavor,
|
|
1013
|
+
extensions: config.parser_extensions.clone(),
|
|
1014
|
+
..Default::default()
|
|
1015
|
+
}),
|
|
1016
|
+
);
|
|
1017
|
+
|
|
1018
|
+
let blocks = collect_code_blocks(&tree, input, &config);
|
|
1019
|
+
assert_eq!(blocks.len(), 2);
|
|
1020
|
+
for block in blocks {
|
|
1021
|
+
assert_eq!(
|
|
1022
|
+
block.code_style,
|
|
1023
|
+
BTreeMap::from([("line-width".to_string(), "80".to_string())])
|
|
1024
|
+
);
|
|
1025
|
+
}
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1028
|
+
#[test]
|
|
1029
|
+
fn repeated_code_style_key_in_one_metadata_block_uses_last_value() {
|
|
1030
|
+
let input = "---\ncode-style: {line-width: 40}\ncode-style:\n line-width: 60\n line-width: 80\n---\n\n```r\nx <- 1\n```\n";
|
|
1031
|
+
let config = Config {
|
|
1032
|
+
flavor: Flavor::Pandoc,
|
|
1033
|
+
parser_extensions: Extensions::for_flavor(Flavor::Pandoc),
|
|
1034
|
+
..Default::default()
|
|
1035
|
+
};
|
|
1036
|
+
let tree = crate::parser::parse(
|
|
1037
|
+
input,
|
|
1038
|
+
Some(ParserOptions {
|
|
1039
|
+
flavor: config.flavor,
|
|
1040
|
+
extensions: config.parser_extensions.clone(),
|
|
1041
|
+
..Default::default()
|
|
1042
|
+
}),
|
|
1043
|
+
);
|
|
1044
|
+
|
|
1045
|
+
let blocks = collect_code_blocks(&tree, input, &config);
|
|
1046
|
+
assert_eq!(blocks.len(), 1);
|
|
1047
|
+
assert_eq!(blocks[0].code_style["line-width"], "80");
|
|
1048
|
+
}
|
|
911
1049
|
|
|
912
1050
|
#[test]
|
|
913
1051
|
fn split_hashpipe_header_handles_empty_value_with_indented_list() {
|