Closed mikatuo closed 10 months ago
For code blocks on Manuals pages tab size of 4/2 spaces is used, on API Reference pages - 4 spaces. The Examples pages however use tabs.
Manuals - 4 spaces (https://defold.com/manuals/message-passing/#message-chains): (looks good)
Examples - tabs (https://defold.com/examples/basics/message_passing/): (tabs take a bit too much space)
Examples - tabs and spaces (https://defold.com/examples/basics/parent_child/): (it looks even worse when there is a mix of both)
There are a lot of examples and they could be written by different people so it will take lot of efforts to fix and maintain consistent indentations manually. The fix replaces each tab with 4 spaces when html is generated.
Examples - 4 spaces (instead of tabs):
Examples - 4 spaces (instead of tabs and spaces):
NIce! Thank you.
Problem
For code blocks on Manuals pages tab size of 4/2 spaces is used, on API Reference pages - 4 spaces. The Examples pages however use tabs.
Manuals - 4 spaces (https://defold.com/manuals/message-passing/#message-chains): (looks good)![image](https://github.com/defold/defold.github.io/assets/7230306/71ebf461-d7bd-4b7f-a07b-98fd632ac8a7)
Examples - tabs (https://defold.com/examples/basics/message_passing/): (tabs take a bit too much space)![image](https://github.com/defold/defold.github.io/assets/7230306/9ba6a77f-a164-4f5a-9bff-82b6554361c3)
Examples - tabs and spaces (https://defold.com/examples/basics/parent_child/): (it looks even worse when there is a mix of both)![image](https://github.com/defold/defold.github.io/assets/7230306/ea4c9d63-76e9-4716-ac3b-cd11405b1f65)
Fix
There are a lot of examples and they could be written by different people so it will take lot of efforts to fix and maintain consistent indentations manually. The fix replaces each tab with 4 spaces when html is generated.
Demo
Examples - 4 spaces (instead of tabs):![image](https://github.com/defold/defold.github.io/assets/7230306/f760d35d-1c7a-45fa-a76a-6a3fdf203832)
Examples - 4 spaces (instead of tabs and spaces):![image](https://github.com/defold/defold.github.io/assets/7230306/c987ba52-5cbe-4526-8a43-06a437cbde22)