Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix possible empty quote #213

Merged
merged 2 commits into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ node_modules/
dist/
.prettier-cache
/book/book
/leptos-fluent-macros/wip/
11 changes: 9 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions leptos-fluent-macros/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#![deny(missing_docs)]
#![forbid(unsafe_code)]
#![cfg_attr(feature = "nightly", feature(track_path))]
#![cfg_attr(feature = "nightly", feature(absolute_path))]

Check warning on line 4 in leptos-fluent-macros/src/lib.rs

View workflow job for this annotation

GitHub Actions / Build example (csr-complete, nightly)

the feature `absolute_path` has been stable since 1.79.0 and no longer requires an attribute to enable

Check warning on line 4 in leptos-fluent-macros/src/lib.rs

View workflow job for this annotation

GitHub Actions / Build example (csr-minimal, nightly)

the feature `absolute_path` has been stable since 1.79.0 and no longer requires an attribute to enable

Check warning on line 4 in leptos-fluent-macros/src/lib.rs

View workflow job for this annotation

GitHub Actions / Build example (system-gtk, nightly)

the feature `absolute_path` has been stable since 1.79.0 and no longer requires an attribute to enable

Check warning on line 4 in leptos-fluent-macros/src/lib.rs

View workflow job for this annotation

GitHub Actions / Build example (ssr-hydrate-actix, nightly)

the feature `absolute_path` has been stable since 1.79.0 and no longer requires an attribute to enable

Check warning on line 4 in leptos-fluent-macros/src/lib.rs

View workflow job for this annotation

GitHub Actions / Build example (ssr-hydrate-actix, nightly)

the feature `absolute_path` has been stable since 1.79.0 and no longer requires an attribute to enable

Check warning on line 4 in leptos-fluent-macros/src/lib.rs

View workflow job for this annotation

GitHub Actions / Build example (ssr-hydrate-axum, nightly)

the feature `absolute_path` has been stable since 1.79.0 and no longer requires an attribute to enable

Check warning on line 4 in leptos-fluent-macros/src/lib.rs

View workflow job for this annotation

GitHub Actions / Build example (ssr-hydrate-axum, nightly)

the feature `absolute_path` has been stable since 1.79.0 and no longer requires an attribute to enable

//! Macros for the leptos-fluent crate.
//!
Expand Down Expand Up @@ -728,9 +728,6 @@
for attr in html_tag_as_string.split(' ') {
let mut parts = attr.split('=');
let key = parts.next().unwrap_or("");
if key.is_empty() {
continue;
}
let value = parts.next().unwrap_or("");
if key == "class" {
class = Some(value.trim_matches('"').to_string().into());
Expand Down Expand Up @@ -759,7 +756,7 @@
};

match quote.is_empty() {
true => quote! {},
true => quote! { false },
false => match param.exprpath {
Some(ref path) => quote! { #path{#quote} },
None => quote,
Expand Down Expand Up @@ -818,7 +815,7 @@
};

match quote.is_empty() {
true => quote! {},
true => quote! { false },
false => match param.exprpath {
Some(ref path) => quote! { #path{#quote} },
None => quote,
Expand Down
Loading