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

pygments.rb options not working #1382

Closed
trilader opened this issue Sep 30, 2013 · 14 comments
Closed

pygments.rb options not working #1382

trilader opened this issue Sep 30, 2013 · 14 comments
Labels

Comments

@trilader
Copy link

Today I installed octopress to build a blog. When I tried to add a code block to an article using either the backtick or the codeblock syntax things like linenos:false or start:51 don't work and get put into the title.

According to the documentation available at http://octopress.org/docs/plugins/codeblock/ and http://octopress.org/docs/blogging/code/ it should work like this:

{% codeblock lang:bash FooBar test text linenos:false %}
echo "Hello World"
exit 1
{% endcodeblock %}

The resulting code highlight has a title of "FooBar test text linenos:false" instead of the expected "FooBar test text" and line numbers which it should not have.

@wJsJwr
Copy link

wJsJwr commented Oct 11, 2013

I was also stuck in the problem for a while, and then I checked the source code. It seems that some options like mark and linenos have been removed, and the syntax becomes:

{% codeblock [title] [url] [link text] %}
code snippet
{% endcodeblock %}

I don't know why these useful options are removed, the current version is too simple.

@parkr
Copy link
Collaborator

parkr commented Oct 11, 2013

@wJsJwr Are you talking about the current code on master, or your code locally?

@wJsJwr
Copy link

wJsJwr commented Oct 12, 2013

@parkr I'm talking about the current code on master, since I cloned it just two weeks ago.
I checked a bit more and found that the rich-option version just the fix to Issue #584 , and I found your comment :-).
So from that time, those options have been already removed from the source, maybe I should merge these two version: current master & 2.1, to get the fully functioned codeblock.

@GR360RY
Copy link

GR360RY commented Nov 17, 2013

Did somebody managed to find the commit that should be merged into master that fixes this issue ?

@ramsey
Copy link

ramsey commented Nov 28, 2013

I'm having this problem, too.

@shidarin
Copy link

Thought I was crazy when I ran into this on both codeblocks and backtick blocks, I've been pulling my hair out.

Looking at the code in 2.1 around the time of the commit for the markup and the sass code now, things have drastically changed to the point where a simple merge from back then would not rectify this issue- at least a simple merge by me, unfamiliar with the codebase.

This is really disappointing, because the fancy line numbers and code highlighting demos on the octopress webpage were why I picked up Octopress. I ended up cloning the site-2.1 branch directly- which is the Octopress page itself. Reset the theme with 'rake install', remove all the content and set the config to your liking and you've got a site with at LEAST the same features as the Octopress page.

@skelz0r
Copy link

skelz0r commented Dec 22, 2013

Same here.

@parkr
Copy link
Collaborator

parkr commented Dec 22, 2013

It's not released yet. I'll change the docs.

@parkr
Copy link
Collaborator

parkr commented Dec 22, 2013

Check out octopress/docs#16

@parkr parkr closed this as completed Dec 22, 2013
@pwntester
Copy link

Is it going to be released? or its been removed for good?

@shidarin
Copy link

It's never been merged into master. If I'm following the tree correctly, it's still in and a part of the 3.0 release (currently in alpha2?)

@simonewebdesign
Copy link
Contributor

Same problem here.

@wsargent
Copy link

Just ran into this today. It would be nice to have line numbers.

@parkr
Copy link
Collaborator

parkr commented Jun 25, 2014

@wsargent The code in #1590 should fix this for you.

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

No branches or pull requests

10 participants