Last 12 weeks · 0 commits
2 of 6 standards met
strips ANSI CSI escape sequences (e.g. SGR color codes) when computing a cell's visible width, but it does not recognize OSC 8 hyperlink escape sequences ( or the BEL-terminated variant ). As a result, any cell whose value includes a terminal hyperlink is measured as if the escape sequence bytes were visible characters, inflating the calculated column width and breaking table alignment/borders. This PR caters for those hyperlink sequences.
Thanks for this great gem. Full disclosure: I'm not sure if this is a feature request, a documentation request, or me just being blind (in case of the latter, apologies for the stupid question), but is there any simple way to completely disable borders/separators entirely? I have to think there is because this is such a popular gem, but I can't find how.. I know there's , but I haven't figured out anything similar for borders. Setting to , , or doesn't seem to work for me. The only ways I can figure out to do it are: Subclassing This hash entry makes me suspect the solution is assigning to some option, but I can't get that to work either. Am I missing something? If so, can I ask what it is and request it be documented? (I'm happy to submit a PR doing so). If not, would you accept a PR to add such an option? (Feedback welcome on how you'd like users to select the option.) Thanks so much PS: Possibly related: If I call , is there any way to omit the blank lines that get outputted before/after the table?
I am trying to figure out how to set a given column to a hard width. I don't want every column of the table to be this width, just one. I was looking at the code in cell.rb, and I see this: @width = options.fetch :width, @value.to_s.size But that's the end of that instance variable. It is never used. It would be nice if a table could be defined something like this: table = Terminal::Table.new :style => {:width => [:auto, :auto, 80, :auto]} Thanks! Myles
I am getting an error with version 1.8.0, while version 1.7.3 does not seem to have the problem. I never had this error before, perhaps I had version 1.7.3 installed before today. Code System info Ruby: ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-linux] RVM: rvm 1.29.3 (latest) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io] Bundler: Bundler version 1.17.2 OS: Ubuntu 16.04.5 LTS
Repository: tj/terminal-table. Description: Ruby ASCII Table Generator, simple and feature rich. Stars: 1573, Forks: 124. Primary language: Ruby. Languages: Ruby (100%). License: MIT. Latest release: v4.0.0 (1y ago). Open PRs: 2, open issues: 3. Last activity: 2mo ago. Community health: 42%. Top contributors: nateberkopec, tj, rrrene, scottjg, nanobowers, smtlaissezfaire, wbotelhos, vizv, mvz, jescholl and others.