discord / simpleast Goto Github PK
View Code? Open in Web Editor NEWExtensible Android library for both parsing text into Abstract Syntax Trees and rendering those trees as rich text.
License: Other
Extensible Android library for both parsing text into Abstract Syntax Trees and rendering those trees as rich text.
License: Other
Instead of manually adding languages as described in #18. For future language support, we should have a means to read in TextMate language files, and build the language rules.
The initial support is a hack week project so it was scoped down to just add support ASAP and the basic foundations of parsing out a CodeNode
I apologize if this isn't the place to ask for this, but where can i find all the regex patterns discord uses to detect bold, italics, etc?
When I send a message where the first characters, in the first line, in a code block, is whitespaces, like this:
```
Some Text
More Test
```
Then the prepended whitespaces is removed from the first line, when displayed on Android and message looks like this:
Some Text
More Test
On Discord Desktop and iOS app, the same message is rendered the way I would expect it:
Some Text
More Test
I tested this markdown code block regex, but the matching seems to work correctly:
val language = ...
)val codeBody = ...
)So my suspicion is that codeBody
is trimmed (removing all prepending- and appending whitespaces, newlines etc.) later on. That would explain why it only happens on the first line of the code block.
But the only use of trim()
I can find is in MarkdownRules.kt in a override fun parse()
function:
val classes = matcher.group(2)?.trim()?.split(' ')
..and I have zero idea if it's related in any way.
There is also the possibility that this bug is outside of SimpleAST .. ?
The Code highlighting for the XML language is kinda odd looking, when compared to the desktop equivalent.
On mobile does it look like that right now (I use AMOLED Dark theme):
Meanwhile on Desktop (Windows) is it rendered like this:
It bothers me, that indend ending sections, like the </block>
in our example, have a completely different text fill color, while all the other ones seem perfectly fine.
This should be corrected to have it more similar to the desktop version of the App.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.