Skip to content

Conversation

@codedninja
Copy link

@codedninja codedninja commented Apr 22, 2025

Do to the limitation of not wanting to parse the whole rendered HTML, this feature doesn't support CSS child combiner syntax. It only supports current element syntax. Examples of query selectors are listed below.

I do think there is a better way to inject the HTML attributes when calling Tag::render_open() or Tag::render_close() in packages/mrml-core/src/prelude/render/tags.rs. Though I am still learning Rust, I couldn't think of a good way to do so yet.

a[href]
.super_duper_class
#id_tags
div[parm="true"]

@jdrouet jdrouet changed the title Add support for mj-html-attributes, mj-selector, and mj-html-attribtue feat: add support for mj-html-attributes, mj-selector, and mj-html-attribtue May 12, 2025
@codecov
Copy link

codecov bot commented May 12, 2025

Codecov Report

❌ Patch coverage is 73.22721% with 185 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.33%. Comparing base (5311e58) to head (314a691).
⚠️ Report is 139 commits behind head on main.

Files with missing lines Patch % Lines
packages/mrml-core/src/prelude/render/tag.rs 7.44% 87 Missing ⚠️
packages/mrml-core/src/mj_selector/parse.rs 53.33% 28 Missing ⚠️
packages/mrml-core/src/mj_html_attributes/parse.rs 30.30% 23 Missing ⚠️
packages/mrml-core/src/mj_html_attributes/mod.rs 17.64% 14 Missing ⚠️
packages/mrml-core/src/mj_html_attribute/mod.rs 20.00% 12 Missing ⚠️
packages/mrml-core/src/mj_html_attribute/json.rs 71.42% 6 Missing ⚠️
packages/mrml-core/src/mj_hero/render.rs 86.84% 5 Missing ⚠️
packages/mrml-core/src/mj_head/parse.rs 40.00% 3 Missing ⚠️
packages/mrml-core/src/mj_html_attribute/parse.rs 90.90% 3 Missing ⚠️
packages/mrml-core/src/mj_html_attribute/print.rs 85.00% 3 Missing ⚠️
... and 1 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #535      +/-   ##
==========================================
- Coverage   92.89%   91.33%   -1.56%     
==========================================
  Files         227      213      -14     
  Lines       12203    12869     +666     
==========================================
+ Hits        11336    11754     +418     
- Misses        867     1115     +248     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant