GithubHelp home page GithubHelp logo

Comments (8)

ericgoodwin avatar ericgoodwin commented on June 2, 2024

cc/ @gjtorikian @mdiep

from html-pipeline.

ericgoodwin avatar ericgoodwin commented on June 2, 2024

It looks like it is thinking the Right Double Quotation Mark is part of the email address when doing the autolink. This could be related to this bug. vmg/redcarpet#388

from html-pipeline.

jch avatar jch commented on June 2, 2024

@ericgoodwin do you have a backtrace of the error?

from html-pipeline.

ericgoodwin avatar ericgoodwin commented on June 2, 2024

Not sure it's much help because there is only one line that isn't Pry, but here it is.

[2] pry(main)> renderer.to_html("β€œ[email protected]”").split
ArgumentError: invalid byte sequence in UTF-8
from (pry):2:in `split'
[3] pry(main)> wtf
Exception: ArgumentError: invalid byte sequence in UTF-8
--
0: (pry):2:in `split'
1: (pry):2:in `__pry__'
2: /Users/ericgoodwin/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/pry-0.10.1/lib/pry/pry_instance.rb:355:in `eval'
3: /Users/ericgoodwin/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/pry-0.10.1/lib/pry/pry_instance.rb:355:in `evaluate_ruby'
4: /Users/ericgoodwin/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/pry-0.10.1/lib/pry/pry_instance.rb:323:in `handle_line'

The error can also be created by just using github-markdown as well.

[7] pry(main)> GitHub::Markdown.to_html("β€œ[email protected]”", :gfm).split
ArgumentError: invalid byte sequence in UTF-8
from (pry):4:in `split'

from html-pipeline.

ericgoodwin avatar ericgoodwin commented on June 2, 2024

Just found out it's an issue with Ruby versions as well.
Pasting the same text ("β€œ[email protected]”") into irb Ruby 1.9 vs 2.1.3

Ruby 2.1.3

irb(main):001:0> "β€œ[email protected]”"
=> "β€œ[email protected]”"

Ruby 1.9

irb(main):001:0> "\[email protected]\U+FFE2"
=> "[email protected]"

It would appear that Ruby 1.9 is converting the characters automatically.

from html-pipeline.

jch avatar jch commented on June 2, 2024

@ericgoodwin πŸ‘ thanks for digging in. I'm going to close this issue for now because I can't think of anything specific to take action on. If you find more details about the encoding, please continue to comment here. I'm happy to reopen if there is a fix that can be applied against the gem.

from html-pipeline.

ericgoodwin avatar ericgoodwin commented on June 2, 2024

@jch Ok. Wasn't quite sure where to post this in the first place. I might keep on adding a few comments on here if that's ok with you so anyone else who runs into the issue can find some information on it. The issue seems to be with the github-markdown binary.

from html-pipeline.

jch avatar jch commented on June 2, 2024

πŸ‘ Yep keep 'em coming

from html-pipeline.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.