Allow line comment
likern opened this issue · 4 comments
In my opinion, this seems like the sort of thing that the user can define for themselves as a helper function, though I can be convinced otherwise. Perhaps something like #comment(inline: true)[...]
would make sense?
Though at the very least, I have been trying to come up with some sort of escape hatch so you can tell algo
to not emphasize a particular word. For now, you can pass a more minimal list of keywords to the keywords
parameter, and then use #strong[...]
to emphasize words as needed on top of that, but I recognize this is somewhat annoying.
In my opinion, this seems like the sort of thing that the user can define for themselves as a helper function, though I can be convinced otherwise. Perhaps something like
#comment(inline: true)[...]
would make sense?
I think yes, would make sense
In general that's what I did - created separate function. But
- Words with strong style in these self-made comments
- I can't recreate default styles in comments (don't know their values)
- Need override default comment style to match 1-1 with my custom comments
In general I would prefer a more general solution for these cases. In that case I wouldn't need inline comments if could do it myself
I can't recreate default styles in comments (don't know their values)
In retrospect, this is a pretty big oversight on my part. I plan on making the following changes:
- Add an
inline
option tocomment
to display a comment in place. This will respectcomment-styles
and be insensitive tostrong-keywords
. - Create a function to escape a word from being emphasized by
strong-keywords
. I'll have to do this anyway to implement 1, but I think it's useful enough to expose it as a user-facing function as well. I'll probably call itnoemph
or something like that. - Update the README to list the default values of every function.
Above three changes have been implemented as of 5a4ee88.