Fix superscript
This commit is contained in:
parent
80bc331721
commit
3602a0218c
|
@ -37,7 +37,7 @@ let data = Data(buffer: buf)
|
|||
let code = String(data: data, encoding: .utf8)!
|
||||
```
|
||||
|
||||
You may notice that the code string length is being passed into the function as an unsigned 64-bit integer, and then being converted to an `Int`, which may not be capable of representing the value. But, since this is just a syntax highlighter for my blog, there's absolutely no chance of it ever being used to highlight a string longer than 2^63-1 bytes.
|
||||
You may notice that the code string length is being passed into the function as an unsigned 64-bit integer, and then being converted to an `Int`, which may not be capable of representing the value. But, since this is just a syntax highlighter for my blog, there's absolutely no chance of it ever being used to highlight a string longer than 2<sup>63</sup>-1 bytes.
|
||||
|
||||
The actual highlighting I'll skip, you can refer to the documentation for Splash. Once that's done, though, the output needs to be sent back to Rust somehow. Again, since the function signature needs to be compatible with C, it returns a pointer to a byte buffer containing the UTF-8 encoded string. It also sets a length pointer provided by the caller to the length in bytes of the output.
|
||||
|
||||
|
|
Loading…
Reference in New Issue