RST: Detect `::` signifying default language code-block.
See original GitHub issueblacken-docs
will do this:
- call ``reset_queries()``, like this::
+ call ``reset_queries()``, like this:
+
+ .. code-block:: python
But it’s an old-as-time RST convention that the ::
means the following code block is the default language (i.e. Python)
Not respecting that is quite a lot of noise. Is there a way to control it? Could there be?
Thanks!
Issue Analytics
- State:
- Created 10 months ago
- Comments:12 (2 by maintainers)
Top Results From Across the Web
Allow one to set a default language for code blocks #17 - GitHub
It would be practical if one could set a default language for highlighting code blocks -- e.g. through a buffer-local variable.
Read more >1 Code::Blocks Project Management
During the first startup, Code::Blocks will copy the presettings from 'Default User' to the application data of the current users.
Read more >Choose language type for code blocks in the Content Editor
Create a new code block with a default (plaintext) styling; Choose a syntax highlighting language from supported languages in highlight.js ...
Read more >reStructuredText Primer - Sphinx documentation
reStructuredText is the default plaintext markup language used by Sphinx. ... The code-block directive can be used to set highlighting on a block-by-block ......
Read more >Code blocks with syntax highlighting - TYPO3 Documentation
You can set the default language with the highlight directive. All following code blocks will use the language as specified in the highlight...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It’s not just up to me 😄
Personally, I do want to keep the
::
usage, but we can always adapt if the benefits are worth it.I still need to investigate all the changes but, I’m more concerned by the required Oh, it always has to be valid code changes.
The trouble with skips is we no longer have an auto-formatter.
What we need is a black-ish that will hand wave over the invalid bits. (Don’t think that’s on the table)
You’ve been looking at this for while. I only just came to it. I also need to confer with Mariusz.
(This seems more a discussion for the Django PR than here… 😬)
That’s OK. Disagreement on such is within the bounds of reason 😜