How to prevent the automatic code recognition by indentation in Markdown?
18:50 19 Jan 2026

I want to add the summary block inside dl. Since the markdown engine of npm and GitHub supports both of these tags, basically it will not be any problems with displaying (not true for Nuget). However, the automatic code detection by indentation is the hindrance.

With below markdown code

createArrayOfNaturalNumbers

Obviously from the function name, creates an array of natural numbers. Elements count, ascending/descending and starting number can be specified.

Signature
        
          (
            compoudParameter: Readonly<{

              elementsCount: number;

              /** @default false */
              isDescendingOrder?: boolean;

              /** @default 1 */
              startingNumber?: number;

            }>
          ): Array
        
      

The part since

will be recognized as the code:

enter image description here

Even I'll remove the empty lines around

<\p> (what will make the code less readable for me)

createArrayOfNaturalNumbers

Obviously from the function name, creates an array of natural numbers. Elements count, ascending/descending and starting number can be specified.

Signature
        
          (
            compoudParameter: Readonly<{

              elementsCount: number;

              /** @default false */
              isDescendingOrder?: boolean;

              /** @default 1 */
              startingNumber?: number;

            }>
          ): Array
        
      

the part since elementsCount: number will not be correctly recognized:

enter image description here

This automatic code recognition is a obstruction! Now way to escape it or disable by any other way? I want the high-quality README!

markdown