Skip to content

Fix code blocks rendering#106

Closed
SimonMarquis wants to merge 1 commit into
googlesamples:mainfrom
SimonMarquis:fix-markdeep-codeblocks
Closed

Fix code blocks rendering#106
SimonMarquis wants to merge 1 commit into
googlesamples:mainfrom
SimonMarquis:fix-markdeep-codeblocks

Conversation

@SimonMarquis

Copy link
Copy Markdown

File mask: *.md.html
Find: ^(~+)([a-zA-Z0-9 ]+)\n([\s\S]+?)\n~+
Replace: $1$2\n$3\n$1

Fixes #105

@SimonMarquis SimonMarquis changed the title Fixes code blocks rendering Fix code blocks rendering Feb 11, 2026
File mask: *.md.html
Find: ^(~+)([a-zA-Z0-9 ]+)\n([\s\S]+?)\n~+
Replace: $1$2\n$3\n$1

Change-Id: Iedc19ab609ac9eb6dc4a4b98a9a8aa2c3ce4fe6b
@SimonMarquis
SimonMarquis force-pushed the fix-markdeep-codeblocks branch from edd9561 to 65f9dc9 Compare February 11, 2026 12:19
@SimonMarquis

SimonMarquis commented Feb 11, 2026

Copy link
Copy Markdown
Author

@tnorbye the CONTRIBUTING.md states that:

Note the all the documentation under docs/ is only a mirror; the original documentation is maintained in the Android source code repository:

but it seems like it is missing all the docs/checks/.
Should I open a CL over there and find out where these checks are generated and fix it as well? (This bug is also probably inside lint)

Edit: opened a CL for the .md.html files: https://android-review.googlesource.com/c/platform/tools/base/+/3948280

@SimonMarquis

Copy link
Copy Markdown
Author

Found it!

https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/cli/src/main/java/com/android/tools/lint/LintIssueDocGenerator.kt;l=1216-1230

val max = 70 - language.length - if (lineNumbers) " linenumbers".length else 0

This max should either:

  • be a constant
  • or detect if we are in the start or end delimiter

@SimonMarquis

Copy link
Copy Markdown
Author

Fixed by #107

jrguzman-ms pushed a commit to msft-mirror-aosp/platform.tools.base that referenced this pull request Mar 5, 2026
File mask: *.md.html
Find: ^(~+)([a-zA-Z0-9 ]+)\n([\s\S]+?)\n~+
Replace: $1$2\n$3\n$1

See:
- googlesamples/android-custom-lint-rules#105
- googlesamples/android-custom-lint-rules#106

Change-Id: Iedc19ab609ac9eb6dc4a4b98a9a8aa2c3ce4fe6b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Code snippet rendering issue since markdeep 1.18

1 participant