Skip to content

Commit

Permalink
Rename feature macro -> macros
Browse files Browse the repository at this point in the history
  • Loading branch information
lampsitter committed May 11, 2024
1 parent 0eb8d21 commit 8d7e03a
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
### egui_commonmark

This is the main crate. It depends on `egui_commonmark_backend` and can expose
`egui_commonmark_macros` through the `macro` feature.
`egui_commonmark_macros` through the `macros` feature.

### egui_commonmark_macros

Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

- `commonmark!` and `commonmark_str!` for compile time parsing of markdown. The
proc macros will output egui widgets directly into your code. To use this
enable the `macro` feature.
enable the `macros` feature.

### Changed

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ CommonMarkViewer::new("viewer").show(ui, &mut cache, markdown);

## Compile time evaluation of markdown

If you want to embed markdown directly the binary then you can enable the `macro` feature.
If you want to embed markdown directly the binary then you can enable the `macros` feature.
This will do the parsing of the markdown at compile time and output egui widgets.

### Example
Expand All @@ -58,7 +58,7 @@ commonmark_str!("example_file", ui, &mut cache, "content.md");

## Features

* `macro`: macros for compile time parsing of markdown
* `macros`: macros for compile time parsing of markdown
* `better_syntax_highlighting`: Syntax highlighting inside code blocks with
[`syntect`](https://crates.io/crates/syntect)
* `svg`: Support for viewing svg images
Expand Down
6 changes: 5 additions & 1 deletion egui_commonmark/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ pulldown-cmark = { version = "0.10", default-features = false, optional = true }
default = ["load-images", "pulldown_cmark"]

## Enable proc macros for compile time generation of egui widgets from markdown
macro = ["dep:egui_commonmark_macros", "dep:pulldown-cmark"] # For simplicity it only supports pulldown-cmark
macros = ["dep:egui_commonmark_macros", "dep:pulldown-cmark"] # For simplicity it only supports pulldown-cmark

## Builds upon the `macros` feature. Enables tracking of markdown files to recompile
## when their content changes. Uses nightly features
nightly = ["macros", "egui_commonmark_macros/nightly"]

# For internal debugging use only!
dump-macro = ["egui_commonmark_macros/dump-macro"]
Expand Down
4 changes: 2 additions & 2 deletions egui_commonmark/examples/macro.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//! Make sure to run this example from the repo directory and not the example
//! directory. To see all the features in full effect, run this example with
//! `cargo r --example macro --features macro,better_syntax_highlighting`
//! `cargo r --example macro --features macros,better_syntax_highlighting`
//! Add `light` or `dark` to the end of the command to specify theme. Default
//! is light. `cargo r --example macro --features macro,better_syntax_highlighting -- dark`
//! is light. `cargo r --example macro --features macros,better_syntax_highlighting -- dark`
use eframe::egui;
use egui_commonmark::*;
Expand Down
2 changes: 1 addition & 1 deletion egui_commonmark/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
//! ```
//! # Compile time evaluation of markdown
//!
//! If you want to embed markdown directly the binary then you can enable the `macro` feature.
//! If you want to embed markdown directly the binary then you can enable the `macros` feature.
//! This will do the parsing of the markdown at compile time and output egui widgets.
//!
//! ## Example
Expand Down
2 changes: 1 addition & 1 deletion egui_commonmark_macros/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<img src="https://raw.githubusercontent.com/lampsitter/egui_commonmark/master/assets/example-v3.png" alt="showcase" width=280/>

This crate is `egui_commonmark`'s compile time variant. It is recommended to use
this crate through `egui_commonmark` by enabling the `macro` feature.
this crate through `egui_commonmark` by enabling the `macros` feature.


## Usage
Expand Down

0 comments on commit 8d7e03a

Please sign in to comment.