Expose a template's format to view engines so they can render a Markdown mail's text version
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 35/100
Research direction
Start with Template::format() and the Format type, which the issue says are currently restricted in visibility. Read the built-in Markdown mail rendering path to see how it uses Format::TextVersion, then compare it with the third-party Engine example. Done when an external engine can inspect the template format and render a Markdown mail's text version; pull request #881 is already open for this issue.
Written by the indexing model from the issue text.
Description
For Markdown mail, the framework renders a message's text body with Format::TextVersion, and the mail components use simpler markup in that mode. A third-party Engine can't see the mode:
impl Engine for MyEngine {
fn render(&self, template: &Template<'_>) -> laravel::Result<String> {
let format = template.format();
// error[E0599]: method `format` is private
// template.is_plain_text() is false for TextVersion
todo!()
}
}
Format is re-exported but #[doc(hidden)], and Template::format() is pub(crate). Making Template::format() public (and Format a documented type) would let other engines render the text version of Markdown mail as the built-in one does.
Context: found while porting Laravel's mail Markdown components to a Blade engine for Laravel for Rust (oxblade).
- Dominant language
- Rust
- Stars
- 847
- Forks
- 174
- Avg merge
- 5h 40m
- Merged PRs (30d)
- 167
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from laravel/rust-framework
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
laravel/rust-framework#864 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 64/100
laravel/rust-framework#876 ·
Maintainers usually reply within 1 day
-
Case-sensitive contains, starts_with and ends_with that match % and _ literally on every databaseOpen
Difficulty 4/5 3-5 days Newbie friendliness 58/100
laravel/rust-framework#874 ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
laravel/rust-framework#873 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 58/100
laravel/rust-framework#872 ·
Maintainers usually reply within 1 day
All issues in laravel/rust-framework
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
neuralmagic/crucible#579 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
eclipse-score/kyron#249 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
seanmonstar/reqwest#3157 ·
Maintainers usually reply within 2 days