Telegram has taken notable steps toward supporting TON code highlighting—a much-requested feature for developers building on The Open Network (TON). While the groundwork for syntax-highlighted code sharing is now laid in Telegram’s backend, users and developers are still waiting for these enhancements to become visible in Telegram apps. This article explains the technical background, the recent updates, and the practical implications and risks associated with TON code highlighting.
Recent Additions and Technical Details
In September 2024, Telegram’s engineering team introduced major changes to the codebase that handles code block highlighting for message content. Specifically, the Tolk smart contract language was newly added, and improved definitions for both Tact and FunC were incorporated. The Tact language was updated from version 1.2.0 to 1.6.0, while FunC moved from version 0.2.0 to 0.4.4. These changes also refined the way Fift and TL-B, two other TON-specific languages, are described within Telegram's internal repositories.
Despite these additions, there is a critical bottleneck that prevents users from seeing any TON code highlighting in their Telegram messages. Each Telegram client (across desktop, iOS, and Android platforms) relies on a precompiled grammar table—a binary file called grammars.dat—which defines how to visually color-code programming languages in messages. This table collects and compiles language rules from sources like Prism.js and internal repository files, including rules for TON languages.
However, the grammar table currently bundled with Telegram clients was last generated in November 2023—months before these TON language improvements. Therefore, even though the latest language definitions are present in the repository, they have not been delivered to end-users. According to Gram News, this backend update is not visible in applications until new clients are released with a rebuilt grammars.dat file.
Telegram’s Android client has its own Java-based highlighter. Its language table, codelng.gzip, was last bundled with version 10.2 in October 2023. This system is independent, uses different regular expression engines, and like the desktop and iOS apps, it still displays gray monospace code blocks for all TON-specific languages.
How Code Highlighting Works in Telegram
Telegram’s syntax highlighting architecture centers on client-side processing. When a message containing a code block (for example, “` `tact ... ` “`) is posted in a chat, the app checks its bundled grammar table to match the provided language tag. If the relevant grammar is found, the code block is visually color-highlighted according to rules for keywords, strings, comments, and other syntax features.
For TON developers, this system includes official support in the codebase for Tolk, Tact, FunC, Fift, and TL-B. Yet, until the corresponding language grammars are integrated into the shipped grammar table, Telegram clients cannot display syntax highlighting for these languages. Regardless of whether the code is tagged “tact,” “func,” or “tolk” in a message, the output remains a plain gray monospace block.
This technical delay has direct impacts. Developers and smart contract builders cannot easily share readable or visually clear code in Telegram chats. The process for onboarding new developers, reviewing contract logic, or debugging together is hindered—especially since TON smart contracts are typically complex and benefit from syntax highlighting for clarity.
Current Limitations and What to Expect
Although definitions for Tact, FunC, Fift, TL-B, and Tolk are fully written and merged into Telegram’s source repository, these upgrades are not yet reflected in the daily user experience. All major Telegram clients across platforms continue to run with grammar tables compiled in late 2023, before any TON-specific enhancements.
There are no available user-side workarounds. Only a formal client update, in which Telegram regenerates and includes the fresh grammar tables, can enable TON code highlighting on Telegram. As a result, anyone sharing TON code—be it for documentation, code reviews, or collaborative development—will see it rendered without color coding or language awareness, reducing readability and increasing the possibility of errors or misunderstandings.
Another risk is the ongoing lag between language innovation and platform support. As the TON ecosystem evolves rapidly, new language features or updates may still take months to appear visually in Telegram, decreasing the attractiveness of Telegram as a home for collaborative coding. For smart contract builders, this may require temporarily shifting to other platforms for code sharing until Telegram deploys the expected syntax-highlighting enhancement.
Implications for the TON Community
The ongoing absence of TON code highlighting in Telegram clients affects developer workflows, impairs community collaboration, and puts added pressure on Telegram to shorten the update cycle for grammar tables. While the technical foundation for these upgrades is now robust—highlighted by the recent repository updates—real-world usability depends entirely on Telegram’s release schedules.
For developers and project teams, staying informed about Telegram’s application-level changes is vital. For the latest client update announcements and other TON ecosystem developments, check Latest TON news.
For further reading about Telegram’s preparation for TON code highlighting, see the analysis at Gram News.
