Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: suranyami/coderay
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: rubychan/coderay
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Able to merge. These branches can be automatically merged.
Loading
Showing with 4,971 additions and 48,553 deletions.
  1. +12 −0 .circleci/config.yml
  2. +26 −0 .codeclimate.yml
  3. +6 −17 .gitignore
  4. +32 −0 .rubocop.yml
  5. +1,183 −0 .rubocop_todo.yml
  6. +0 −1 .rvmrc
  7. +4 −0 .simplecov
  8. +32 −6 .travis.yml
  9. +1 −40 README.textile → CREDITS.textile
  10. +0 −344 Changes-1.0.textile
  11. +421 −0 Changes-pre-1.0.textile
  12. +440 −358 Changes.textile
  13. +48 −49 FOLDERS
  14. +12 −8 Gemfile
  15. +0 −30 IDEA
  16. +0 −504 LICENSE
  17. +22 −0 MIT-LICENSE
  18. +29 −0 README.markdown
  19. +3 −1 Rakefile
  20. +0 −47 TODO
  21. +35 −152 bench/bench.rb
  22. +68 −31 bin/coderay
  23. +11 −17 coderay.gemspec
  24. +0 −184 etc/CodeRay.tmproj
  25. +0 −63 etc/ansi-color/256colors2.pl
  26. +0 −48 etc/ansi-color/colortable16.sh
  27. +0 −1 etc/check-coderay-gem-stats.sh
  28. +0 −27 etc/check-diffs.rb
  29. +0 −27 etc/coderay-complete.tmproj
  30. +0 −164 etc/coderay-lib.tmproj
  31. +0 −135 etc/coderay.local.tmproj
  32. +0 −33 etc/compare-token-variants.rb
  33. BIN etc/grafix/coderay-favicon.png
  34. BIN etc/grafix/coderay.ico
  35. +0 −28 etc/grafix/languages_over_time.rb
  36. BIN etc/grafix/logo.cdr
  37. +0 −243 etc/grafix/pie_graph.rb
  38. BIN etc/grafix/ruby-chan-coderay-small.cpt
  39. BIN etc/grafix/ruby-chan-coderay-small.png
  40. BIN etc/grafix/ruby-chan-coderay.cpt
  41. BIN etc/grafix/ruby-doc-chan.cpt
  42. BIN etc/grafix/ruby-doc-chan.gif
  43. BIN etc/grafix/rubychan-blue-top.cpt
  44. BIN etc/grafix/rubychan-blue.cpt
  45. +0 −39 etc/highlighter-rating.textile
  46. +0 −59 etc/language_report.textile
  47. +0 −34 etc/output_report.textile
  48. +0 −43 etc/raydebug.vim
  49. +0 −449 etc/simple_regexp_scanner.rb
  50. +0 −132 etc/speedup/current.rb
  51. +0 −208 etc/speedup/direct-stream.rb
  52. +0 −12,997 etc/todo/example.applescript
  53. +0 −8,289 etc/todo/example.lua
  54. BIN etc/todo/example.lua.zip
  55. +0 −79 etc/todo/latex.demiurgo.rb
  56. +0 −44 etc/todo/latex.murphy.rb
  57. BIN etc/todo/scanners.zip
  58. +0 −219 etc/todo/scanners/applescript-sebastian.rb
  59. +0 −153 etc/todo/scanners/avrasm.rb
  60. +0 −131 etc/todo/scanners/bash-Anh Ky Huynh.rb
  61. +0 −124 etc/todo/scanners/bash.rb
  62. +0 −6,820 etc/todo/scanners/clojure-libs.in.clj
  63. +0 −193 etc/todo/scanners/coderay_lua_lexar.patch
  64. +0 −156 etc/todo/scanners/csharp.rb
  65. +0 −170 etc/todo/scanners/css.rb
  66. +0 −199 etc/todo/scanners/javascript.rb
  67. +0 −102 etc/todo/scanners/lisp.rb
  68. +0 −88 etc/todo/scanners/paste-333 (DIFF).rb
  69. +0 −134 etc/todo/scanners/paste-693 (IO).rb
  70. +0 −248 etc/todo/scanners/php-constants.txt
  71. +0 −282 etc/todo/scanners/php.rb
  72. +0 −5,075 etc/todo/scanners/php_builtin_functions.txt
  73. +0 −526 etc/todo/scanners/php_builtin_functions_core.txt
  74. +0 −455 etc/todo/scanners/ruby-inside-regexp-detection.rb
  75. +0 −136 etc/todo/scanners/scheme.rb
  76. +0 −138 etc/todo/scanners/sql.Josh Goebel.rb
  77. +0 −142 etc/todo/scanners/sql.Keith Pitt.rb
  78. +0 −143 etc/todo/scanners/sql.Keith.rb
  79. +0 −132 etc/todo/scanners/vhdl.rb
  80. +0 −105 etc/todo/scanners/yaml.rb
  81. +0 −11 etc/todo/www.demiurgo.org/darcs/coderay/_darcs/checkpoints/index.html
  82. +0 −17 etc/todo/www.demiurgo.org/darcs/coderay/_darcs/index.html
  83. +0 −17 etc/todo/www.demiurgo.org/darcs/coderay/_darcs/index.html@C=D;O=A
  84. +0 −17 etc/todo/www.demiurgo.org/darcs/coderay/_darcs/index.html@C=M;O=A
  85. +0 −17 etc/todo/www.demiurgo.org/darcs/coderay/_darcs/index.html@C=N;O=D
  86. +0 −17 etc/todo/www.demiurgo.org/darcs/coderay/_darcs/index.html@C=S;O=A
  87. +0 −11 etc/todo/www.demiurgo.org/darcs/coderay/_darcs/inventories/index.html
  88. +0 −17 etc/todo/www.demiurgo.org/darcs/coderay/_darcs/inventory
  89. +0 −18 etc/todo/www.demiurgo.org/darcs/coderay/_darcs/patches/index.html
  90. +0 −16 etc/todo/www.demiurgo.org/darcs/coderay/_darcs/prefs/index.html
  91. +0 −13 etc/todo/www.demiurgo.org/darcs/coderay/_darcs/pristine/index.html
  92. +0 −14 etc/todo/www.demiurgo.org/darcs/coderay/index.html
  93. +0 −14 etc/todo/www.demiurgo.org/darcs/coderay/index.html@C=D;O=A
  94. +0 −14 etc/todo/www.demiurgo.org/darcs/coderay/index.html@C=D;O=D
  95. +0 −14 etc/todo/www.demiurgo.org/darcs/coderay/index.html@C=M;O=A
  96. +0 −14 etc/todo/www.demiurgo.org/darcs/coderay/index.html@C=M;O=D
  97. +0 −14 etc/todo/www.demiurgo.org/darcs/coderay/index.html@C=N;O=A
  98. +0 −14 etc/todo/www.demiurgo.org/darcs/coderay/index.html@C=N;O=D
  99. +0 −14 etc/todo/www.demiurgo.org/darcs/coderay/index.html@C=S;O=A
  100. +0 −14 etc/todo/www.demiurgo.org/darcs/coderay/index.html@C=S;O=D
  101. +0 −12 etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/encoders/index.html
  102. +0 −12 etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/encoders/index.html@C=D;O=A
  103. +0 −12 etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/encoders/index.html@C=M;O=A
  104. +0 −12 etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/encoders/index.html@C=N;O=D
  105. +0 −12 etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/encoders/index.html@C=S;O=A
  106. +0 −79 etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/encoders/latex.rb
  107. +0 −13 etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/index.html
  108. +0 −13 etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/index.html@C=D;O=A
  109. +0 −13 etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/index.html@C=D;O=D
  110. +0 −13 etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/index.html@C=M;O=A
  111. +0 −13 etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/index.html@C=M;O=D
  112. +0 −13 etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/index.html@C=N;O=A
  113. +0 −13 etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/index.html@C=N;O=D
  114. +0 −13 etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/index.html@C=S;O=A
  115. +0 −13 etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/index.html@C=S;O=D
  116. +0 −13 etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/scanners/index.html
  117. +0 −13 etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/scanners/index.html@C=D;O=A
  118. +0 −13 etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/scanners/index.html@C=M;O=A
  119. +0 −13 etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/scanners/index.html@C=N;O=D
  120. +0 −13 etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/scanners/index.html@C=S;O=A
  121. +0 −199 etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/scanners/javascript.rb
  122. +0 −12 etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/scanners/javascript/index.html
  123. +0 −12 etc/todo/www.demiurgo.org/darcs/coderay/lib/index.html
  124. +0 −12 etc/todo/www.demiurgo.org/darcs/coderay/lib/index.html@C=D;O=A
  125. +0 −12 etc/todo/www.demiurgo.org/darcs/coderay/lib/index.html@C=D;O=D
  126. +0 −12 etc/todo/www.demiurgo.org/darcs/coderay/lib/index.html@C=M;O=A
  127. +0 −12 etc/todo/www.demiurgo.org/darcs/coderay/lib/index.html@C=M;O=D
  128. +0 −12 etc/todo/www.demiurgo.org/darcs/coderay/lib/index.html@C=N;O=A
  129. +0 −12 etc/todo/www.demiurgo.org/darcs/coderay/lib/index.html@C=N;O=D
  130. +0 −12 etc/todo/www.demiurgo.org/darcs/coderay/lib/index.html@C=S;O=A
  131. +0 −12 etc/todo/www.demiurgo.org/darcs/coderay/lib/index.html@C=S;O=D
  132. +0 −13 etc/todo/www.demiurgo.org/darcs/coderay/test/index.html
  133. +0 −13 etc/todo/www.demiurgo.org/darcs/coderay/test/index.html@C=D;O=A
  134. +0 −13 etc/todo/www.demiurgo.org/darcs/coderay/test/index.html@C=M;O=A
  135. +0 −13 etc/todo/www.demiurgo.org/darcs/coderay/test/index.html@C=N;O=D
  136. +0 −13 etc/todo/www.demiurgo.org/darcs/coderay/test/index.html@C=S;O=A
  137. +0 −104 etc/todo/www.demiurgo.org/darcs/coderay/test/test_javascript_scanner.rb
  138. +0 −103 etc/todo/www.demiurgo.org/darcs/coderay/test/test_latex_encoder.rb
  139. +0 −22 etc/token_class_hierarchy.rb
  140. +29 −22 lib/coderay.rb
  141. +18 −0 lib/coderay/encoders.rb
  142. +5 −17 lib/coderay/encoders/debug.rb
  143. +63 −0 lib/coderay/encoders/debug_lint.rb
  144. +2 −13 lib/coderay/{ → encoders}/encoder.rb
  145. +115 −84 lib/coderay/encoders/html.rb
  146. +7 −7 lib/coderay/encoders/html/css.rb
  147. +26 −33 lib/coderay/encoders/html/numbering.rb
  148. +10 −4 lib/coderay/encoders/html/output.rb
  149. +2 −2 lib/coderay/encoders/json.rb
  150. +59 −0 lib/coderay/encoders/lint.rb
  151. +0 −1 lib/coderay/encoders/statistic.rb
  152. +121 −105 lib/coderay/encoders/terminal.rb
  153. +57 −47 lib/coderay/helpers/file_type.rb
  154. +0 −41 lib/coderay/helpers/gzip.rb
  155. +0 −229 lib/coderay/helpers/plugin.rb
  156. +221 −0 lib/coderay/helpers/plugin_host.rb
  157. +0 −5 lib/coderay/helpers/word_list.rb
  158. +27 −0 lib/coderay/scanners.rb
  159. +2 −2 lib/coderay/scanners/c.rb
  160. +21 −19 lib/coderay/scanners/cpp.rb
  161. +35 −31 lib/coderay/scanners/css.rb
  162. +18 −8 lib/coderay/scanners/debug.rb
  163. +56 −36 lib/coderay/scanners/diff.rb
  164. +208 −0 lib/coderay/scanners/go.rb
  165. +19 −6 lib/coderay/scanners/groovy.rb
  166. +1 −1 lib/coderay/scanners/haml.rb
  167. +44 −22 lib/coderay/scanners/html.rb
  168. +6 −6 lib/coderay/scanners/java.rb
  169. +2 −0 lib/coderay/scanners/java/builtin_types.rb
  170. +32 −9 lib/coderay/scanners/java_script.rb
  171. +15 −12 lib/coderay/scanners/json.rb
  172. +280 −0 lib/coderay/scanners/lua.rb
  173. +24 −6 lib/coderay/scanners/php.rb
  174. +5 −5 lib/coderay/scanners/python.rb
  175. +27 −18 lib/coderay/scanners/raydebug.rb
  176. +37 −21 lib/coderay/scanners/ruby.rb
  177. +24 −21 lib/coderay/scanners/ruby/patterns.rb
  178. +15 −7 lib/coderay/scanners/ruby/string_state.rb
  179. +232 −0 lib/coderay/scanners/sass.rb
  180. +59 −45 lib/coderay/{ → scanners}/scanner.rb
  181. +25 −30 lib/coderay/scanners/sql.rb
  182. +36 −0 lib/coderay/scanners/taskpaper.rb
  183. +3 −3 lib/coderay/scanners/yaml.rb
  184. +15 −0 lib/coderay/styles.rb
  185. +38 −28 lib/coderay/styles/alpha.rb
  186. +1 −6 lib/coderay/{ → styles}/style.rb
  187. +70 −75 lib/coderay/token_kinds.rb
  188. +28 −179 lib/coderay/tokens.rb
  189. +55 −0 lib/coderay/tokens_proxy.rb
  190. +1 −1 lib/coderay/version.rb
  191. +0 −40 rake_helpers/ca.rb
  192. +0 −636 rake_helpers/coderay_rdoc_template.rb
  193. +0 −1,518 rake_helpers/html_coderay_generator.rb
  194. +1 −2 rake_tasks/benchmark.rake
  195. +0 −6 rake_tasks/bundler.rake
  196. +1 −1 {rake_helpers → rake_tasks}/code_statistics.rb
  197. +0 −93 rake_tasks/diff.rake
  198. +2 −10 rake_tasks/documentation.rake
  199. +12 −15 rake_tasks/generator.rake
  200. +0 −10 rake_tasks/ruby-versions.rake
  201. +1 −1 rake_tasks/statistic.rake
  202. +29 −21 rake_tasks/test.rake
  203. +0 −1 sample/README
  204. +0 −2 sample/cache.expected
  205. +0 −12 sample/cache.rb
  206. +0 −1 sample/count.expected
  207. +0 −10 sample/count.rb
  208. +0 −130 sample/css.expected
  209. +0 −4 sample/css.rb
  210. +0 −17 sample/div.expected
  211. +0 −19 sample/div.rb
  212. +0 −21 sample/dump.expected
  213. +0 −15 sample/dump.rb
  214. +0 −65 sample/encoder.expected
  215. +0 −39 sample/encoder.rb
  216. +0 −3 sample/global_vars.expected
  217. +0 −13 sample/global_vars.rb
  218. +0 −10 sample/global_vars2.expected
  219. +0 −28 sample/global_vars2.rb
  220. +0 −175 sample/highlight.expected
  221. +0 −14 sample/highlight.rb
  222. +0 −919 sample/html.expected
  223. +0 −394 sample/html.rb
  224. +0 −185 sample/html2.expected
  225. +0 −11 sample/html2.rb
  226. +0 −160 sample/html_list.expected
  227. +0 −12 sample/html_list.rb
  228. +0 −8 sample/load_encoder.expected
  229. +0 −25 sample/load_encoder.rb
  230. +0 −8 sample/load_scanner.expected
  231. +0 −25 sample/load_scanner.rb
  232. +0 −2 sample/more.expected
  233. +0 −205 sample/more.rb
  234. +0 −16 sample/scanner.expected
  235. +0 −36 sample/scanner.rb
  236. +0 −110 sample/server.rb
  237. +0 −1 sample/simple.expected
  238. +0 −10 sample/simple.rb
  239. +0 −25 sample/stream.rb
  240. +0 −2 sample/stream2.expected
  241. +0 −8 sample/stream2.rb
  242. +0 −86 sample/suite.rb
  243. +0 −1 sample/tokens.expected
  244. +0 −3 sample/tokens.rb
  245. +35 −0 spec/coderay_spec.rb
  246. +105 −0 spec/spec_helper.rb
  247. +4 −2 test/executable/suite.rb
  248. +22 −6 test/functional/basic.rb
  249. +13 −12 test/functional/examples.rb
  250. +11 −16 test/functional/for_redcloth.rb
  251. +2 −0 test/functional/suite.rb
  252. +1 −1 test/unit/comment_filter.rb
  253. +1 −1 test/unit/count.rb
  254. +9 −7 test/unit/debug.rb
  255. +16 −23 test/unit/file_type.rb
  256. +2 −0 test/unit/filter.rb
  257. +103 −0 test/unit/html.rb
  258. +7 −7 test/unit/json_encoder.rb
  259. +3 −10 test/unit/lines_of_code.rb
  260. +1 −1 test/unit/null.rb
  261. +2 −4 test/unit/plugin.rb
  262. +3 −2 test/unit/statistic.rb
  263. +3 −0 test/unit/suite.rb
  264. +1 −1 test/unit/text.rb
  265. +0 −36 test/unit/tokens.rb
12 changes: 12 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
jobs:
build:
docker:
- image: cimg/ruby:3.3.5
environment:
RAILS_ENV: test
steps:
- checkout
- run: |
bundle install
- run: |
bundle exec rake test
26 changes: 26 additions & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
version: "2"
checks:
argument-count:
enabled: false
complex-logic:
enabled: false
file-lines:
enabled: false
identical-code:
enabled: false
method-complexity:
enabled: false
method-count:
enabled: false
method-lines:
enabled: false
nested-control-flow:
enabled: false
return-statements:
enabled: false
similar-code:
enabled: false
plugins:
rubocop:
enabled: true
channel: rubocop-0-76
23 changes: 6 additions & 17 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,12 @@
*.gem
*.rbc
.bundle
.config
.*
bench/example.*
coverage
InstalledFiles
lib/bundler/man
pkg
rdoc
spec/reports
test/tmp
test/version_tmp
tmp

doc
Gemfile.lock
.rvmrc

old-stuff
pkg
spec/examples.txt
spec/reports
test/executable/source.rb.html
test/executable/source.rb.json
test/scanners
bench/test.div.html
diff.html
32 changes: 32 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
inherit_from: .rubocop_todo.yml

AllCops:
TargetRubyVersion: 2.3
DisplayStyleGuide: true
Exclude:
- 'test/scanners/**/*'
- 'bench/example.ruby'
- 'old-stuff/**/*'
- 'test/lib/**/*'

Gemspec/RequiredRubyVersion:
Enabled: false

Gemspec/DuplicatedAssignment:
Enabled: false

Layout/AccessModifierIndentation:
Enabled: false

Layout/AlignArguments:
Enabled: false

Layout/AlignArray:
Enabled: false

Layout/AlignHash:
Enabled: false

Layout/SpaceInsideBlockBraces:
EnforcedStyle: space
EnforcedStyleForEmptyBraces: space
Loading