GithubHelp home page GithubHelp logo

juno / redmine_markdown_extra_formatter Goto Github PK

View Code? Open in Web Editor NEW
47.0 6.0 24.0 28 KB

[OBSOLETE] Markdown Extra formatter plugin for Redmine.

Ruby 32.25% JavaScript 27.52% HTML 33.13% CSS 7.11%

redmine_markdown_extra_formatter's Introduction

THIS PROJECT IS DEPRECATED AND NO LONGER MAINTAIN. (Feb, 2018)

Redmine Markdown Extra formatter

This is a redmine plugin for supporting Markdown Extra as a wiki format.

What is redmine?

Redmine is a flexible project management web application. See the official site for more details.

What is Markdown Extra?

PHP Markdown Extra is a special version of PHP Markdown implementing some features currently not available with the plain Markdown syntax. (excerpt from http://michelf.com/projects/php-markdown/extra/)

Prerequisites

Installation

  1. Copy the plugin directory into the vendor/plugins directory
  2. Start Redmine
  3. Installed plugins are listed on 'Admin -> Information' screen.

Credits

  • Junya Ogura (http://github.com/juno) for making the change to use BlueFeather library
  • Yuki Sonoda (http://github.com/yugui) did the real work by creating the redmine_rd_formatter
  • Jean-Philippe Lang for making the change to RedMine (based on Yuki's patch) to allow pluggable formatters

Suggestions, Bugs, Refactoring?

Fork away and create a Github Issue. Pull requests are welcome. http://github.com/juno/redmine_markdown_extra_formatter/tree/master

Bitdeli Badge

redmine_markdown_extra_formatter's People

Contributors

asai avatar bitdeli-chef avatar donza avatar juno avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar

redmine_markdown_extra_formatter's Issues

Underscores inside words format as italic

When writing inline code as underscores_in_words the formatter captures these and adds italics for each underscore pair.

The workaround is to make sure you use backticks around it, or indent it as a code block.

markdown_extra_formatter conflicts with wiki_extensions

Hi!

Recently I've switched from textile formatter to markdown_extra (v0.0.6) and discovered that macros from wiki_extensons, particularly {{comments}} and {{comment_form}} can't be rendered correctly.

Also fnlist macro can't be executed.

So a simple page like this:
-------------- 8< --------------- >8 ---------------

Test Page

{{comments}}
{{comment_form}}
-------------- 8< ---------------->8 ----------------

is rendered smth like this:

TestPage

Error executing the comments macro (undefined method `call' for nil:NilClass)

Error executing the comment_form macro (undefined method `call' for nil:NilClass)

Error executing the fnlist macro (undefined method `call' for nil:NilClass)

Double relative url

Hey,

when I use relative root rewrite in additional_environment.rb like config.action_controller.relative_url_root = '/projects'

The formatting help link is rendered with /projects/projects/(...) and click on it produced 404, while regular Redmine links are working ok.

I met passenger issue "no such file to load -- bluefeather..." when install the plugin

The entire error message is:
no such file to load -- bluefeather (MissingSourceFile)

Backtrace:
# File Line Location
0 /var/www/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb 184 in require' 1 /var/www/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb 184 inrequire'
2 /var/www/redmine/vendor/plugins/markdown_extra/lib/redmine_markdown_extra_formatter/wiki_formatter.rb 2
3 /var/www/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb 184 in require' 4 /var/www/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb 184 inrequire'
5 /var/www/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb 291 in require_or_load' 6 /var/www/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb 451 inload_missing_constant'
7 /var/www/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb 106 in const_missing' 8 /var/www/redmine/vendor/plugins/markdown_extra/init.rb 12 inevaluate_init_rb'
9 /var/www/redmine/lib/redmine/plugin.rb 67 in instance_eval' 10 /var/www/redmine/lib/redmine/plugin.rb 67 inregister'
11 /var/www/redmine/vendor/plugins/markdown_extra/init.rb 6 in evaluate_init_rb' 12 /var/www/redmine/vendor/rails/railties/lib/rails/plugin.rb 158 inevaluate_init_rb'
13 /var/www/redmine/vendor/rails/activesupport/lib/active_support/core_ext/kernel/reporting.rb 11 in silence_warnings' 14 /var/www/redmine/vendor/rails/railties/lib/rails/plugin.rb 154 inevaluate_init_rb'
15 /var/www/redmine/vendor/rails/railties/lib/rails/plugin.rb 48 in load' 16 /var/www/redmine/config/../vendor/plugins/engines/lib/engines/plugin.rb 44 inload'
17 /var/www/redmine/vendor/rails/railties/lib/rails/plugin/loader.rb 38 in `load_plugins'
.....

I have already installed the bluefeather version 0.20, 0.30 & 0.40 using 'gem install bluefeather', but the problem doesn't solved.

toc macro not working

I'm trying to use the {{toc}} macro in Redmine 1.0.1 with the latest version of the plugin, but am getting the following in my page:

Error executing the toc macro (undefined method `call' for nil:NilClass)

There doesn't appear to be anything else in my logs to help debug this further. Any ideas on what may be wrong?

Syntax Highlighting requires a trailing newline

Having switched from the default text formatter to Markdown Extra, I found many examples where our Wiki entries or issue descriptions were no longer syntax highlighted.

I traced this down to the regular expression used to define a code section, currently at line 139 of lib/redmine_markdown_extra_formatter/wiki_formatter.rb.

Reading this, I see that after the <code> tag is closed, there is some (optional) whitespace, then a required newline. This obviously will not work if passed the following text:

<pre><code class="sql">SELECT * FROM table WHERE (field = 'foo');</code></pre>

Is this an issue that could be addressed in your code, or should I fork a copy?

Thanks.

Plugin does not honor relative_url_root in the redirect controller

This plugin does not generate correct URLs to the redirect controller when deployed in a sub-url. The relative_url_root from the request is not prepended onto the /redirect URL. I have redmine installed at www.example.com/redmine. I just hacked wiki_formatter.rb to put the /redmine/redirect in there, but it seems like it would be easy to fix properly if you know Rails (I don't.)

Indented code blocks can have further indented code sub-blocks.

When trying to format a code block that has indented lines surrounded by blank lines indented inside a list item, the blank-line-surrounded-indented-code ends up in a code sub-block.

Example:

1. Some code

        if (1) {

                printf("what?\n");
        }

2. Some other code
    ~~~
    while(0) {

            exit(-1);
    }
    ~~~

The if and while blocks are correctly contained in a code block which is part of their respective list items, but the printf and exit lines are surrounded by their own <pre><code></code></pre> tags because they are surrounded by blank lines and are indented an additional 8 spaces.

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.