question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Why curly braces for block-level directives?

See original GitHub issue

This may have been discussed before, but I am curious to know why curly braces are needed for block level directives?

Instead of

```{directivename} <directive arguments>
:optionname: <valuename>

<directive content>

we could have the following which would be lighter while typing.

```directivename <directive arguments>
:optionname: <valuename>

<directive content>

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
echarlescommented, Jul 16, 2020

Yep, I have reloaded RStudio which supports python (Knitr will generate a block text with highlights) vs {python} which will be run.

Closing this issue, sorry for the noise, and thx for your answers.

0reactions
choldgrafcommented, Jul 16, 2020

though if MyST Notebooks didn’t use curly braces, how would you specify that you don’t want a Python chunk to be run? Many notebooks also include literal python (e.g. for demonstrations)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why are curly braces in programming languages important?
Curly-brace code blocks​​ For example, Java and C++ are often referred to as curly brace languages because curly braces are used to define...
Read more >
Roles and Directives - MyST-Parser - Read the Docs
Directives - a block-level extension point#. Directives syntax is defined with triple-backticks and curly-brackets. It is effectively a Markdown code fence ...
Read more >
php - Identifying Potential Fatal Errors from Curly Braces since PHP8 ...
After an update to php8 on my server, the plugin failed, with a fatal error about curly braces no longer being supported for...
Read more >
coding style - Single statement if block - braces or no?
The first is better because the second is error-prone. For example, let's say you are temporarily commenting out code to debug something:
Read more >
1. Basic Concepts - CSS Pocket Reference, 5th Edition [Book]
One or more @import directives can be placed at the beginning of any stylesheet. ... The declaration block is always enclosed in curly...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found