Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markdown indent-syntax code block copies initial indent (Origin: bugzilla #681281) #4840

Closed
doxygen opened this Issue Jul 2, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@doxygen
Copy link
Owner

doxygen commented Jul 2, 2018

status RESOLVED severity normal in component general for ---
Reported in version 1.8.1.2 on platform Other
Assigned to: Dimitri van Heesch

On 2012-08-06 08:32:23 +0000, Micha� Górny wrote:

I'm using the indent-syntax to create code blocks in doxygen/markdown files alike:

int some_random_code();

(indenting using a single tab)

For that, I'd expect (and that's what markdown parsers do):

int some_random_code();

But instead, doxygen gives me:

    int some_random_code();

In other words, the initial indent is copied into the code while it should be stripped.

On 2012-08-06 09:10:32 +0000, Dimitri van Heesch wrote:

Hi Michal,

Doxygen replaces tabs by spaces before doing Markdown processing according to the TAB_SIZE setting in the config file.
Doxygen does strip the 4 spaces that are required for a block from the block's contents.

If TAB_SIZE is 8, then still 4 spaces (of the 8 spaces that made up the tab) are left unstripped.
If TAB_SIZE is 4, then the indent should be stripped correctly.

Can you check if this fixes the problem?

On 2012-08-06 09:24:42 +0000, Micha� Górny wrote:

(In reply to comment # 1)

Doxygen replaces tabs by spaces before doing Markdown processing according to
the TAB_SIZE setting in the config file.
Doxygen does strip the 4 spaces that are required for a block from the block's
contents.

If TAB_SIZE is 8, then still 4 spaces (of the 8 spaces that made up the tab)
are left unstripped.
If TAB_SIZE is 4, then the indent should be stripped correctly.

Can you check if this fixes the problem?

Yes, indeed it does. Could you please at least mention that in the docs? I believe it's a deviation from the standard Markdown which expects either 4 spaces or 1 tab, and it can be a bit confusing to people using Markdown before.

On 2012-08-06 09:35:41 +0000, Dimitri van Heesch wrote:

I agree.

I will make the default for TAB_SIZE 4, and plan to add the following text:

"
Markdown allows both a single tab or 4 spaces to start a code block.
Since doxygen already replaces tabs by spaces before doing Markdown
processing, the effect will only be same if TAB_SIZE in the config file
has been set to 4. When it is set to a higher value spaces will be present in the code block. A lower value will prevent a single tab to be interpreted as the start of a code block.
"

Please review this text and let me know if you have any comments.

On 2012-08-06 09:54:41 +0000, Micha� Górny wrote:

That sounds great, thanks.

On 2012-08-11 13:18:27 +0000, Dimitri van Heesch wrote:

This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.8.2. Please verify if this is indeed the case. Reopen the
bug if you think it is not fixed and please include any additional information
that you think can be relevant.

@doxygen doxygen closed this Jul 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.