alwindoss / morse

Morse Code Library in Go
https://pkg.go.dev/github.com/alwindoss/morse
BSD 3-Clause "New" or "Revised" License
82 stars 13 forks source link

special characters is supported? #17

Closed Declarcall closed 5 years ago

Declarcall commented 5 years ago

Is your feature request related to a problem? Please describe. Excuse me, special characters, such as: ":", "=", "&", is not supported yet? Example:

package main

import (
    "strings"
    "fmt"
    "github.com/alwindoss/morse"
)

func main()  {
    h:=morse.NewHacker()
    encode,_:=h.Encode(strings.NewReader(":=:&=:"))
    decode,_:=h.Decode(strings.NewReader(string(encode)))
    fmt.Println(string(decode))
}

Output empty string.

alwindoss commented 5 years ago

@Declarcall you are right these characters are not supported yet, you can raise a PR for this, add the mappings to the constants.go I can accept the PR

alwindoss commented 5 years ago

Closed as part of PR https://github.com/alwindoss/morse/pull/18