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

:linenos: param is not parsed?? #38

Closed
s2krish opened this issue Dec 22, 2015 · 3 comments
Closed

:linenos: param is not parsed?? #38

s2krish opened this issue Dec 22, 2015 · 3 comments

Comments

@s2krish
Copy link

s2krish commented Dec 22, 2015

Hi,

I have following code-block

.. code-block:: HTML
   :linenos:

Then it is giving error like Error in "code-block" directive: unknown option: "linenos".

What is the issue? I am using markfield 1.4.0, and docutils 0.12. My setting is like:

import markdown
from docutils.core import publish_parts

def render_rest(markup):
    parts = publish_parts(source=markup, writer_name="html4css1")
    return parts["fragment"]

MARKUP_FIELD_TYPES = (
    ('markdown', markdown.markdown),
    ('ReST', render_rest),
)

Thanks, and I select markup type ReST while saving.

@jamesturk
Copy link
Owner

I think this is an issue w/ docutils, I'm not sure linenos is an option it
accepts?

I'm not seeing it here:
http://docutils.sourceforge.net/docs/ref/rst/directives.html but do you
have it working elsewhere?

On Tue, Dec 22, 2015 at 6:16 AM, Krish notifications@github.com wrote:

Hi,

I have following code-block

.. code-block:: HTML
:linenos:

Then it is giving error like Error in "code-block" directive: unknown
option: "linenos".

What is the issue? I am using markfield 1.4.0, and docutils 0.12. My
setting is like:

import markdown
from docutils.core import publish_parts

def render_rest(markup):
parts = publish_parts(source=markup, writer_name="html4css1")
return parts["fragment"]

MARKUP_FIELD_TYPES = (
('markdown', markdown.markdown),
('ReST', render_rest),
)

Thanks, and I select markup type ReST while saving.


Reply to this email directly or view it on GitHub
#38.

@jamesturk
Copy link
Owner

let me know if this is still an issue for you, otherwise I'll close this in a few days, thanks!

@s2krish
Copy link
Author

s2krish commented Dec 31, 2015

Thanks @jamesturk you are right the issue is with docutils. http://sphinx-doc.org/ allow this. I realized that Sphinx it has custom directive. Yes, please close it.

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

2 participants