parmentelat / jupyterlab-celltagsclasses

BSD 3-Clause "New" or "Revised" License
2 stars 1 forks source link

Support `alert-` tags #4

Open psychemedia opened 1 month ago

psychemedia commented 1 month ago

Thealert-success, alert-warning, alert-danger classes are supported for colouring div elements in markdown cells (e,g, <div class="alert-success">Success!</div>).

It would be useful if corresponding cell tags could be propagated as is to cell classes.

parmentelat commented 1 month ago

hey the fact that boostrap is loaded in the environment is somewhat incidental, is it not ? so instead of defining any hard-coded exception, maybe we could implement a totally blind schema that says that tags of the form asis-foobar end up with a class foobar

so in your use case you would add tags asis-alert-success

if that's an acceptable fit for you, I'd be open to a PR to that effect

parmentelat commented 1 month ago

maybe even tags starting with -asis- so there is clear indication that something odd is going on

i.e. tag -asis-alert-success instead of just asis-alert-success

thinking aloud here mostly...

psychemedia commented 1 month ago

@parmentelat that could work. Or how about propagating tags that start wirh an underscore without the underscore?

parmentelat commented 1 month ago

yes I guess I was inching towards that kind of scheme too, I'd prefer a dash though, so that -alert-success would yield the behaviour you are requesting

this should be available within version 0.5.2, please give it a try

disclaimers though:

psychemedia commented 1 month ago

Thanks. I will update this package as soon as I get a chance in my test and deployment environments.