carbon
carbon copied to clipboard
Malformatted code
Describe the bug Go code appears malformatted
To Reproduce Steps to reproduce the behavior:
- Go to carbon.now.sh
- type the following code:
type Greeter interface {
Greet(target string) string
}
- Copy image to clipboard, get the following:
Expected behavior Proper formatting
Info (please complete the following information):
- OS [e.g. macOS, Linux, Windows, iOS]: macOS
- Browser [e.g. Chrome, Safari, Firefox]: Chrome
- Carbon URL [e.g. carbon.now.sh?bg=pink]: https://carbon.now.sh/?bg=rgba%28255%2C255%2C255%2C1%29&t=one-light&wt=none&l=text%2Fx-go&width=680&ds=false&dsyoff=20px&dsblur=68px&wc=true&wa=true&pv=0px&ph=0px&ln=false&fl=1&fm=Hack&fs=14px&lh=133%2525&si=false&es=2x&wm=false&code=type%2520Greeter%2520interface%2520%257B%250A%2520%2520Greet%28target%2520string%29%2520string%250A%257D
Hello,
Just adding a comment here.
Currently it is not only related to golang but every language. The image copied inside the clipboard is different than the one displayed in the website if the sentence is "too long"
Thanks !
I have the same problem.
class Person: NSObject, NSCoding {
var name : String
var sex : Int
enum Key: String {
case name
case sex
}
init(name: String, sex: Int) {
self.name = name
self.sex = sex
}
func encode(with coder: NSCoder) {
coder.encode(name, forKey: Key.name.rawValue)
coder.encode(sex, forKey: Key.sex.rawValue)
}
required convenience init?(coder decoder: NSCoder) {
let name = decoder.decodeObject(forKey: Key.name.rawValue)
let sex = decoder.decodeInteger(forKey: Key.sex.rawValue)
if let name = name as? String {
self.init(name: name, sex: sex)
}
return nil
}
}
Export with svg, everything works fine.