diff --git a/src/rules.ts b/src/rules.ts index aeb880c597..92fe66498a 100644 --- a/src/rules.ts +++ b/src/rules.ts @@ -41,7 +41,7 @@ try { })(); export const other = { - codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, + codeRemoveIndent: /^(?: {0,3}\t| {1,4})/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, diff --git a/test/specs/new/tabs_indented_code.html b/test/specs/new/tabs_indented_code.html new file mode 100644 index 0000000000..d036d907c6 --- /dev/null +++ b/test/specs/new/tabs_indented_code.html @@ -0,0 +1,14 @@ +
foo	baz		bim
+
+

sep

+
three spaces and a tab
+
+

sep

+
lone tab
+
+

sep

+
four spaces
+
+

sep

+
 five spaces
+
diff --git a/test/specs/new/tabs_indented_code.md b/test/specs/new/tabs_indented_code.md new file mode 100644 index 0000000000..86081e613d --- /dev/null +++ b/test/specs/new/tabs_indented_code.md @@ -0,0 +1,20 @@ +--- +renderExact: true +--- + foo baz bim + +sep + + three spaces and a tab + +sep + + lone tab + +sep + + four spaces + +sep + + five spaces