Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Right-side TOC "macro" doesn't work when using markdown syntax #12

Open
joerocklin opened this issue Sep 12, 2012 · 6 comments
Open

Right-side TOC "macro" doesn't work when using markdown syntax #12

joerocklin opened this issue Sep 12, 2012 · 6 comments

Comments

@joerocklin
Copy link

The right-side toc format "macro" (put in quotes because it's not really a macro, but uses the macro markup) uses the format {{>toc}}. The markdown html highlighter seems to take the bare > at the beginning and turn it into >. The regexp that redmine is using to look for the TOC alignment is:

TOC_RE = /<p>\{\{([<>]?)toc\}\}<\/p>/i 

(found in redmine/app/helpers/application_helper.rb on line 881 as of version 2.0.3)

Unfortunately, just changing the TOC_RE definition won't solve the problem as the replace_toc method which uses the regex looks for the > character explicitly. Perhaps a replacement replace_toc method should be supplied with this plugin to handle this case?

@yangacer
Copy link

I'm confronting the same problem. Is there any progress on this?

@joerocklin
Copy link
Author

Oops - hit the wrong button there! I had modified the redmine regexp to make things work on my local installation. If I get some time I'll look into it in the coming weeks to see if there's any way to patch it from the plugin.

@marmotz
Copy link

marmotz commented Jul 15, 2013

any news for this issue ?

@onlyjob
Copy link

onlyjob commented Jul 24, 2013

Indeed it would be very nice to have this issue fixed...

@joerocklin
Copy link
Author

I haven't had a chance to turn my changes into something that can work from the plugin. I do have the setup working with modified redmine code, but I don't think that's an acceptable solution.

@onlyjob
Copy link

onlyjob commented Jul 25, 2013

I'm happy to report that I figured out how to spell right-side TOC with markdown:

><p>{{>toc}}</p>

Thanks @joerocklin, your clue regarding TOC_RE was most helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants