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

basic nuemark inline span support #470

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

nobkd
Copy link
Collaborator

@nobkd nobkd commented Jan 31, 2025

Adds basic support for inline spans:

  • hello [.green "*content*"] etc -> hello <span class="green"><em>content</em></span> etc
  • hello [.myclass] -> hello <span class="myclass"></span>

this is not really pretty currently (and may not work as expected in some cases), but works for now

to be done:

  • inline span support
  • other valid inline html tags [i "content"] -> <i>content</i> () (without manual component) (other PR?)
  • other valid html block tags for block scope nuemark tags (without manual component) (other PR?)
  • maybe doing the last two in nuekit, where you can check, if a custom tag was defined with the same name, and if not use just default html tag?

Note

someone else may take over the other tasks or work more on this, if they want.

@nobkd nobkd force-pushed the nuemark/inline-span branch 2 times, most recently from 3fbf049 to cdc2c25 Compare January 31, 2025 02:04
@nobkd nobkd force-pushed the nuemark/inline-span branch from cdc2c25 to 82a850c Compare January 31, 2025 02:05
@nobkd nobkd marked this pull request as ready for review January 31, 2025 02:15
@nobkd nobkd changed the title quick nuemark inline span support basic nuemark inline span support Jan 31, 2025
@nobkd nobkd mentioned this pull request Jan 31, 2025
@goblinfactory
Copy link
Contributor

Are the quotes entirely necessary?

hello [.green "*content*"] etc -> hello <span class="green"><em>content</em></span> etc

could also be made to work as follows, without requiring quotes

hello [.green *content*] etc -> hello <span class="green"><em>content</em></span> etc

Which is cleaner and easier to read when there might be use cases where a lot of tagging of content in a particular paragraph is required.

@nobkd
Copy link
Collaborator Author

nobkd commented Jan 31, 2025

Yes, you need the quotation marks, though you can also use single (') ones. otherwise it would be an html attribute. (though I'm not sure, if it gets rendered.)

If you have e.g. an emphasis around the content, it might work (on single words?), but i wouldn't bet on it.

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.

2 participants