Skip to content

Commit

Permalink
Tweak features
Browse files Browse the repository at this point in the history
  • Loading branch information
lampsitter committed Sep 24, 2023
1 parent e8739db commit 50b8a74
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@

### Changed

- Image formats are no longer implicitly enabled.
- Use new image API from egui ([#11](https://github.com/lampsitter/egui_commonmark/pull/11) by [@jprochazk](https://github.com/jprochazk)).
- Feature `syntax_highlighting` has been renamed to `better_syntax_highlighting`.
- Updated dependencies.

### Removed

Expand Down
6 changes: 4 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,15 @@ default = ["load-images"]
## Syntax highlighting for code blocks using syntect
better_syntax_highlighting = ["syntect"]

load-images = ["egui_extras/image", "egui_extras/file", "image/png"]
## Enable loading of images. Make sure to also opt in to what image format you need
## through the image crate.
load-images = ["egui_extras/image", "egui_extras/file"]

## Support loading svg images
svg = ["egui_extras/svg"]

## Images with urls will be downloaded and displayed
fetch = ["egui_extras/http", "image/jpeg"]
fetch = ["egui_extras/http"]

[dev-dependencies]
eframe = { git = "https://github.com/emilk/egui", rev = "d949eaf" }
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ Github's markdown syntax: tables, strikethrough, tasklists and footnotes.

## Usage

In Cargo.toml:

```toml
egui_commonmark = "0.8"
# Specify what image formats you want to use
image = { version = "0.24", default-features = false, features = ["png"] }
```

```rust
use egui_commonmark::*;
let markdown =
Expand Down
6 changes: 6 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@
//!
//! ```
//!
//! Remember to opt into the image formats you want to use!
//!
//! ```toml
//! image = { version = "0.24", default-features = false, features = ["png"] }
//! ```
//!
#![cfg_attr(feature = "document-features", doc = "# Features")]
#![cfg_attr(feature = "document-features", doc = document_features::document_features!())]

Expand Down

0 comments on commit 50b8a74

Please sign in to comment.