I intentionally added a period because it was the end of a sentence.
If your Lemmy app messed it up, then that’s a bug in its markdown parser.
I intentionally added a period because it was the end of a sentence.
If your Lemmy app messed it up, then that’s a bug in its markdown parser.
With a good style/best-practice guide, C++ can be quite productive of a language to work with.
Those kinds of guides typically define which standard/convention to use and which features not to use (cough exceptions cough).
I highly recommend Google’s C++ style guide: https://google.github.io/styleguide/cppguide.html.
Just to confirm, if you change ic('test')
to logger.debug('test')
it works as expected? I.e. it creates the log file?
Edit: Also if you change the output format of the logger and use it as the outputFunction
to ic
, does it include the customized format?
I just want to confirm if your ic
is routing through the logger or not, to know if it’s a problem with your logging config or with ic
.
Overwriting sys.stdout
and sys.stderr
seems like a Bad Idea™.
Browsing the icecream source code, it looks like you can do this:
logger = logging.getLogger()
ic.configureOutput(outputFunction=logger.debug)
And then just make sure the logger is configured to actually print at DEBUG level.
Huh. This got me curious.
Yes, I did just type a bare URL. Every mature markdown parser I’ve used turns this into a link, and appropriately handles trailing punctuation.
So I went to the spec, and it’s explicitly called out that this is not an autolink. Autolinks must be explicitly surrounded with angle brackets
<>
.So yeah \shrug.
https://spec.commonmark.org/0.31.2/#autolinks
Edit to be clear: This means that both of our markdown parsers are wrong relative to the commonmark spec. But I’ll argue that if a parser is going to attempt to autolink this, then handling trailing punctuation is better than not.