Skip to content

Conversation

psmit
Copy link
Contributor

@psmit psmit commented Dec 22, 2014

This commits remove the mahonia module and replaces it with the standard functions of the Golang Sub-repositories http://godoc.org/golang.org/x/text/transform and http://godoc.org/golang.org/x/net/html/charset (which are using http://godoc.org/golang.org/x/text/encoding)

This is just one suggestion, I am happy to implement things differently if we want to keep the mahonia module in some form.

for _, f := range diff.Files {
for _, sec := range f.Sections {
for _, l := range sec.Lines {
l.Content = decoder.ConvertString(l.Content)
if c, _, err := transform.String(d, l.Content); err == nil {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I use here 'c' and 'd' in order not to go over 80 chars.

@unknwon
Copy link
Member

unknwon commented Dec 22, 2014

I've made a branch encoding, please re-PR to this so we can make some tests then decide should we approach this way or not. thanks!

@psmit psmit closed this Dec 22, 2014
@psmit psmit deleted the golang_x_text_encoding branch February 5, 2015 12:42
@psmit psmit restored the golang_x_text_encoding branch February 5, 2015 12:42
@psmit psmit deleted the golang_x_text_encoding branch February 5, 2015 12:44
ethantkoenig pushed a commit to ethantkoenig/gogs that referenced this pull request Jan 27, 2017
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants