GithubHelp home page GithubHelp logo

dominch / redmine_highlightjs Goto Github PK

View Code? Open in Web Editor NEW
22.0 22.0 10.0 256 KB

A redmine plugin to highlight code blocks much better than coderay!

License: Other

HTML 1.32% JavaScript 1.36% CSS 91.10% Ruby 6.22%

redmine_highlightjs's People

Contributors

alexandermeindl avatar dominch avatar supergarotinho avatar yourlin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

redmine_highlightjs's Issues

undefined method `highlight_by_language' for Highlightjs

Hi,

I'm trying this plugin in redmine 2.4 on ubuntu.
I followed the installation procedure from http://www.redmine.org/projects/redmine/wiki/Plugins

I also had to add a symlink from
/usr/share/redmine/public/plugin_assets/redmine_highlightjs
to
/usr/share/redmine/plugins/redmine_highlightjs/assets/

but when i try to use the plugin I get a 500 error on my page, with this in the log :
Started GET "/redmine/projects/frex/wiki/Sandbox" for 93.93.152.125 at 2015-09-16 14:47:22 +0200
Processing by WikiController#show as HTML
Parameters: {"project_id"=>"frex", "id"=>"Sandbox"}
Current user: tludwig (id=4)
Rendered wiki/_content.html.erb (3.9ms)
Rendered wiki/show.html.erb within layouts/base (8.8ms)
Completed 500 Internal Server Error in 17.4ms

ActionView::Template::Error (undefined method highlight_by_language' for Highlightjs:Module): 1: <div class="wiki wiki-page"> 2: <%= textilizable content, :text, :attachments => content.page.attachments, 3: :edit_section_links => (@sections_editable && {:controller => 'wiki', :action => 'edit', :project_id => @page.project, :id => @page.title}) %> 4: </div> lib/redmine/syntax_highlighting.rb:23:inhighlight_by_language'
lib/redmine/wiki_formatting/textile/formatter.rb:125:in block in smooth_offtags' lib/redmine/wiki_formatting/textile/formatter.rb:121:ingsub!'
lib/redmine/wiki_formatting/textile/formatter.rb:121:in smooth_offtags' lib/redcloth3.rb:307:into_html'
lib/redmine/wiki_formatting/textile/formatter.rb:43:in to_html' lib/redmine/wiki_formatting.rb:62:into_html'
app/helpers/application_helper.rb:529:in textilizable' app/views/wiki/_content.html.erb:2:in_app_views_wiki__content_html_erb__534908553950101736_53954980'
app/views/wiki/show.html.erb:44:in _app_views_wiki_show_html_erb___2816532835930986738_53653820' app/controllers/wiki_controller.rb:97:inshow'

any clue ?

Thomas

Crash in Redmine 2.6.10

Log:

Started GET "/" for 176.192.242.97 at 2016-06-21 17:50:39 +0300
Processing by WelcomeController#index as HTML
Current user: admin (id=1)
Rendered welcome/index.html.erb within layouts/base (4.4ms)
Completed 500 Internal Server Error in 26.6ms

ActionView::Template::Error (uninitialized constant Highlightjs::Hooks::ViewHighlightedHook::UserAgent):
12: <%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
13: <%= javascript_heads %>
14: <%= heads_for_theme %>
15: <%= call_hook :view_layouts_base_html_head %>
16:
17: <%= yield :header_tags -%>
18:
lib/redmine/hook.rb:61:in block (2 levels) in call_hook' lib/redmine/hook.rb:61:ineach'
lib/redmine/hook.rb:61:in block in call_hook' lib/redmine/hook.rb:58:intap'
lib/redmine/hook.rb:58:in call_hook' lib/redmine/hook.rb:158:incall_hook'
app/views/layouts/base.html.erb:15:in `_app_views_layouts_base_html_erb___2050110720569795547_34888040'

1.0.2 code theme /my/account 404 Error

ActiveRecord::RecordNotFound (Couldn't find all CodeThemeUserSettings with 'id': (first, {:conditions=>["user_id = ?", 1]}) (found 0 results, but was looking for 2)):
  lib/redmine/hook.rb:119:in `block (2 levels) in render_on'
  lib/redmine/hook.rb:117:in `map'
  lib/redmine/hook.rb:117:in `block in render_on'
  lib/redmine/hook.rb:61:in `block (2 levels) in call_hook'
  lib/redmine/hook.rb:61:in `each'
  lib/redmine/hook.rb:61:in `block in call_hook'
  lib/redmine/hook.rb:58:in `tap'
  lib/redmine/hook.rb:58:in `call_hook'
  lib/redmine/hook.rb:167:in `call_hook'
  app/views/my/account.html.erb:34:in `block in _cc579177290608748590be8a74c21b3f'
  app/helpers/application_helper.rb:1027:in `labelled_form_for'
  app/views/my/account.html.erb:14:in `_cc579177290608748590be8a74c21b3f'

Build scripts for latest library

Current lib is included statically (latest - 8.8.0), because of rapid development of highlightJS there should be script for building latest version

Errors with anonymous user

Redmine usually is restricted to logged in users, but it is possible to set it to view issues (with code) by non-logged users, there are some errors on this now.

redmine_highlightjs broke Annotate

After installing this extension, when I select Annotate in a file in the repository, I obtain the full code, as in "View".

It's possible at least to disable this extension to the Annotate view, ideally defaulting to the default syntax highlight in this case?

Code block disappeared in IE8

I know that IE8 is devil... But, all of our company's laptops use IE8 as the standard working browser.

Highlight.js does not support IE8, so I think maybe the plugin should add some compatible code not to use highlight.js in IE8.

styles in fixes.css made code blocks hidden in IE8...

redmine_highlightjs do not display HTML / XML / CSS code in repositories

All code HTML / XML / CSS in the repositories, is translated, instead of being displayed "as is" so , for example if I have an HTML file in the repository, when I see the page, the page elements are translated and it tries to display the elements inside (like tables, IFRAMES, sections, DIVS, XML CSS , etc) instead of the code. Unfortunately this is a big deal, so for now I'll uninstall until further notices for updates. Thank you for the plug-in, I'll keep track of it. I think its a great idea.

Visual interaction with repository view of files

Hello,

There is some visual interaction between redmine_highlightjs 1.0.1 with the file views from repositories.

Environment:
Redmine version 2.6.6.stable
Ruby version 1.9.3-p194 (2012-04-20) [i386-mingw32]
Rails version 3.2.22
Environment production
Database adapter Mysql2
SCM:
Subversion 1.8.13
Git 1.9.5
Filesystem
Redmine plugins:
clipboard_image_paste 1.10
projects_tree_view 0.0.8
redmine_checklists 3.1.1
redmine_code_review 0.6.4
redmine_didyoumean 1.2.0
redmine_highlightjs 1.0.1
redmine_issue_detailed_tabs_time 0.1.0
redmine_issue_templates 0.0.9
redmine_latex_mathjax 0.1.0
redmine_local_avatars 0.1.1
redmine_pastebin 0.2.0
redmine_plugin_views_revisions 0.0.1
redmine_silencer 0.4.0
redmine_theme_changer 0.1.0
redmine_user_issues 0.0.2
redmine_wiki_gchart_formula 0.0.5
redmine_xls_export 0.2.1
redmine_youtube 0.0.1
sidebar_hide 0.0.6
wiking 1.0.0b

I experienced this with C files. When redmine_highlightjs is active the distance between the lines is about twice the normal spacing. Also, the formatting is lost.

Here is normal spacing and formatting
https://www.dropbox.com/s/3xuhwnu4snxvipn/normal_spacing.PNG?dl=0
and here is doubled spacing
https://www.dropbox.com/s/83ou5vn0t290436/extended_spacing.PNG?dl=0

,

zh.yml file with the first line wrongly set to en

redmine_highlightjs/config/locales/zh.yml file with the first line wrongly set to en.
when plugin into redmine will get error like this:
Completed 500 Internal Server Error in 166ms

ActionView::Template::Error (translation missing: en.date.formats.default):

Spanish translation

Good Redmine Plugin!

I have integrated it in my redmine system, and I have created the spanish translation. Here you have my little contribution to the project:

`

# Spanish strings go here for Rails i18n
es:
supported_languages: Lenguajes soportados en esta versión
highlighting_theme: Esquema de colores usado
try_it_link: "Prueba este tema con una demo online:"
code_theme: Esquema de colores
code_theme_title: Cambiar el esquema de colores
allow_redefine: Permitir cambios de esquema de colores por usuario

`

Thanks!

it works with 3.1

not really an issue but an update.
redmine gives this plugin compatible only with the version from 2.4 to 2.6.
I've installed it on my redmine 3.1 and it works perfectly!

thanx!

highlightjs not working with xml output

I can’t seem to get the plugin to work with markdown as my parser. Markdown should allow fenced code blocks like github does (three backticks, optionally followed by the language). However, this does not work in Redmine apparently. How do I use redmine_highlightjs with markdown?

Redmine 3.2.1 support?

My redmine does not come online when I add this plugin.
Does it support the 3.2.1 version?

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.