Coder Social home page Coder Social logo

recommonmark's People

Contributors

agjohnson avatar astrojuanlu avatar choldgraf avatar clayrisser avatar dandersson avatar ericholscher avatar gibfahn avatar hipro avatar jezdez avatar jimic avatar kbenzie avatar kindly avatar loganrosen avatar lu-zero avatar mgeier avatar mitya57 avatar mkcode avatar molpako avatar pfultz2 avatar raptorcz avatar romnempire avatar sgenoud avatar shimizukawa avatar sid-kap avatar t-firefly avatar tbeadle avatar tk0miya avatar tqchen avatar tswast avatar ttmc 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  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  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

recommonmark's Issues

How to set up AutoStructify for local dev?

My process for larger doc changes is typically to work locally and test with make html and then load the file in a browser to test the site including links.
With the AutoStructify setup, any TOC components use the github_doc_root URL so I can't check if my references are correct.
When developing the docs with pure reStructuredText, it uses the file reference. Is there any way to set up AutoStructify so that it works correctly when I am developing docs locally?

Release with updated CommonMark support

The latest recommonmark release requires CommonMark <= 0.5.4, which is too old for some other packages (for my purposes, specifically sphinx-argparse). This is causing ReadTheDocs builds to fail.

Would it be possible to do a release with more recent CommonMark support that was recently added?

Headings don't translate properly with recommonmark and Sphinx >=1.5.2

An example using recommonmark's own docs:

git clone '[email protected]:rtfd/recommonmark.git'
python setup.py develop
cd docs

pip install Sphinx==1.5.1
make gettext
cat _build/locale/index.pot | grep 'Getting Started'
# output is `msgid "Getting Started"`, as expected

rm -r _build
pip install Sphinx==1.5.2
make gettext
cat _build/locale/index.pot | grep 'Getting Started'
# no output!

rm -r _build
pip install Sphinx==1.6.2
make gettext
cat _build/locale/index.pot | grep 'Getting Started'
# no output!

Running a git bisect suggests this commit is to blame: sphinx-doc/sphinx@4d6d8ae

Recommonmark not working with Sphinx 1.6

Recommonmark 0.4.0
Was working with Sphinx 1.5. When I updated to 1.6, build no longer works.

Exception occurred:
  File "python3.4/site-packages/recommonmark/states.py", line 134, in run_role
    content=content)
TypeError: 'NoneType' object is not callable

make html works locally, however, RTD fails to build -- any ideas?

Running Sphinx v1.3.1
making output directory...

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/dockdogs-club-handbook/envs/latest/local/lib/python2.7/site-packages/sphinx/cmdline.py", line 244, in main
    opts.warningiserror, opts.tags, opts.verbosity, opts.jobs)
  File "/home/docs/checkouts/readthedocs.org/user_builds/dockdogs-club-handbook/envs/latest/local/lib/python2.7/site-packages/sphinx/application.py", line 126, in __init__
    confoverrides or {}, self.tags)
  File "/home/docs/checkouts/readthedocs.org/user_builds/dockdogs-club-handbook/envs/latest/local/lib/python2.7/site-packages/sphinx/config.py", line 277, in __init__
    execfile_(filename, config)
  File "/home/docs/checkouts/readthedocs.org/user_builds/dockdogs-club-handbook/envs/latest/local/lib/python2.7/site-packages/sphinx/util/pycompat.py", line 128, in execfile_
    exec_(code, _globals)
  File "/home/docs/checkouts/readthedocs.org/user_builds/dockdogs-club-handbook/envs/latest/local/lib/python2.7/site-packages/six.py", line 699, in exec_
    exec("""exec _code_ in _globs_, _locs_""")
  File "<string>", line 1, in <module>
  File "conf.py", line 25, in <module>
    from recommonmark.transform import AutoStructify
ImportError: No module named transform

Exception occurred:
  File "conf.py", line 25, in <module>
    from recommonmark.transform import AutoStructify
ImportError: No module named transform
The full traceback has been saved in /tmp/sphinx-err-VX3DzD.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!

Cannot nest headers inside of block quotes

If you attempt to use something like the following

> # Header

Recommonmark will through the following stack trace.

# Sphinx version: 1.4.8
# Python version: 3.5.2 (CPython)
# Docutils version: 0.12 release
# Jinja2 version: 2.8
# Last messages:
#   reading sources... [ 58%] setup_osx
#   reading sources... [ 62%] setup_ubuntu
#   reading sources... [ 65%] setup_win7
#   reading sources... [ 68%] setup_win8
#   reading sources... [ 72%] track1
#   reading sources... [ 75%] track1/Page_1_Intro_TOC
#   reading sources... [ 79%] track1/Page_2_Big_Picture
#   reading sources... [ 82%] track1/Page_3_Start_project
#   reading sources... [ 86%] track1/Page_4_Change_code
#   reading sources... [ 89%] track1/Page_5_More_code_changes
# Loaded extensions:
#   alabaster (0.7.9) from /home/user/.virt-envs/installfest/lib/python3.5/site-packages/alabaster/__init__.py
Traceback (most recent call last):
  File "/home/user/.virt-envs/installfest/lib/python3.5/site-packages/sphinx/cmdline.py", line 244, in main
    app.build(opts.force_all, filenames)
  File "/home/user/.virt-envs/installfest/lib/python3.5/site-packages/sphinx/application.py", line 297, in build
    self.builder.build_update()
  File "/home/user/.virt-envs/installfest/lib/python3.5/site-packages/sphinx/builders/__init__.py", line 251, in build_update
    'out of date' % len(to_build))
  File "/home/user/.virt-envs/installfest/lib/python3.5/site-packages/sphinx/builders/__init__.py", line 265, in build
    self.doctreedir, self.app))
  File "/home/user/.virt-envs/installfest/lib/python3.5/site-packages/sphinx/environment.py", line 569, in update
    self._read_serial(docnames, app)
  File "/home/user/.virt-envs/installfest/lib/python3.5/site-packages/sphinx/environment.py", line 589, in _read_serial
    self.read_doc(docname, app)
  File "/home/user/.virt-envs/installfest/lib/python3.5/site-packages/sphinx/environment.py", line 742, in read_doc
    pub.publish()
  File "/home/user/.virt-envs/installfest/lib/python3.5/site-packages/docutils/core.py", line 217, in publish
    self.settings)
  File "/home/user/.virt-envs/installfest/lib/python3.5/site-packages/sphinx/io.py", line 49, in read
    self.parse()
  File "/home/user/.virt-envs/installfest/lib/python3.5/site-packages/docutils/readers/__init__.py", line 78, in parse
    self.parser.parse(self.input, document)
  File "/home/user/.virt-envs/installfest/lib/python3.5/site-packages/recommonmark/parser.py", line 87, in parse
    self.convert_block(ast)
  File "/home/user/.virt-envs/installfest/lib/python3.5/site-packages/recommonmark/parser.py", line 49, in convert_block
    self.convert_blocks(block.children)
  File "/home/user/.virt-envs/installfest/lib/python3.5/site-packages/recommonmark/parser.py", line 45, in convert_blocks
    self.convert_block(block)
  File "/home/user/.virt-envs/installfest/lib/python3.5/site-packages/recommonmark/parser.py", line 55, in convert_block
    self.blockquote(block)
  File "/home/user/.virt-envs/installfest/lib/python3.5/site-packages/recommonmark/parser.py", line 139, in blockquote
    self.convert_blocks(block.children)
  File "/home/user/.virt-envs/installfest/lib/python3.5/site-packages/recommonmark/parser.py", line 45, in convert_blocks
    self.convert_block(block)
  File "/home/user/.virt-envs/installfest/lib/python3.5/site-packages/recommonmark/parser.py", line 51, in convert_block
    self.section(block)
  File "/home/user/.virt-envs/installfest/lib/python3.5/site-packages/recommonmark/parser.py", line 110, in section
    self.current_node.document.note_implicit_target(new_section, new_section)
AttributeError: 'NoneType' object has no attribute 'note_implicit_target'

I've tried parsing that markdown with just commonmark and it works fine, so currently this looks to be a recommonmark specific issue.

I'm not really certain how to debug this further, but if there's anything I can do to help please let me know.

Thank you.

included markdown documents are parsed as rst

I have tried the recommonmark plugin locally and on RTFD.org, and it seems to fail fairly basic Commonmark markup:

http://monkeysign.readthedocs.io/en/latest/

Notice how the following tags are not parsed properly:

  • ### Requirements header
  • code blocks (apt-get install monkeysign is rendered in a <blockquote>)
  • links ([OpenKeychain][] and others)

All this works fine on the standard Commonmark tester here:

http://spec.commonmark.org/dingus/

direct link

is this a bug in commonmark.py or am i doing something wrong?

states.py not referenced through package in transform.py

when i try to run the test 'make html' locally, I get the error

Exception occurred:
File "/[REDACTED]/cats/recommonmark/transform.py", line 4, in
from states import DummyStateMachine
ImportError: No module named 'states'

I'm actually not a python person, so I don't know the inheritance/module mechanism at all, but if you change line 4 of recommonmark/transform.py to reference from recommonmark.states rather than from states, stuff works.

This seems like it's a titchy thing that might be environment dependent. I'm also very confused. Is this actually a bug and ...what's going on?

support Chinese title not well?

If I open the :numbered: option, It seems recommonmark do not work well with Chinese title, such as

测试

but works well with English title, such as

1

a

b

c

Both can generate the toc well, but the content with Chinese just do not match the toc, which is

1.3. 测试
1.3. 你
1.3. 我
1.3. 它

Search exception appearing in the build logs

Hello,

Fist let me thank you for your work on recomonmark. I've need a way to publish to readthedocs that does not compromise search, pdf generation, translations, etc for a very long time and recommonmark seems to finally do the job! Congrats and Thanks!

When I do a build I am seeing an error. Noted below. It seems to be a search related error but search seems to be working. Is there something that I need to adjust on my RTD install or might I be using the wrong version of ElasticSearch (v2.3.0)?

Chris

[23/Apr/2016 09:18:17] ERROR [celery.worker.job:282] Task readthedocs.projects.tasks.update_search[2d777b43-0a01-4a77-8946-00d0e7cb6ef9] raised unexpected: RequestError(400, u'illegal_argument_exception', {u'status': 400, u'error': {u'root_cause': [{u'reason': u"Can't specify parent if no parent field has been configured", u'type': u'illegal_argument_exception'}], u'type': u'illegal_argument_exception', u'reason': u"Can't specify parent if no parent field has been configured"}})
Traceback (most recent call last):
File "/venv/local/lib/python2.7/site-packages/celery/app/trace.py", line 240, in trace_task
R = retval = fun(_args, *_kwargs)
File "/venv/local/lib/python2.7/site-packages/celery/app/trace.py", line 438, in protected_call
return self.run(_args, *_kwargs)
File "/app/readthedocs/projects/tasks.py", line 561, in update_search
delete=delete_non_commit_files,
File "/app/readthedocs/restapi/utils.py", line 144, in index_search_request
page_obj.bulk_index(index_list, parent=project.slug)
File "/app/readthedocs/search/indexes.py", line 140, in bulk_index
bulk_index(self.es, docs, chunk_size=chunk_size)
File "/venv/local/lib/python2.7/site-packages/elasticsearch/helpers/init.py", line 182, in bulk
for ok, item in streaming_bulk(client, actions, **kwargs):
File "/venv/local/lib/python2.7/site-packages/elasticsearch/helpers/init.py", line 124, in streaming_bulk
raise e
RequestError: TransportError(400, u'illegal_argument_exception')

Document reference with file extension not possible

The Auto Doc Ref Feature only works for links without file extensions.

While [some link](link) still links correctly to the corresponding link.md file, [another link](link.md) does not. It might be because of PR #61 since references/links aren't treated the same way.

IMHO linking files with their extension is nicer because these kind of links also work within SCMs like GitHub and GitLab.

Add support for cross-referencing

It would be nice to have something like http://sphinx-doc.org/markup/inline.html

In rST you can do

:doc:`A link <relative/path/to/page>`

rST supports other directives as well, but I think referencing documents is the most important.

Github Wiki supports something like this with the Mediawiki syntax: (see https://help.github.com/articles/adding-links-to-wikis/)

[[A link|Page location]]

I'm not a huge fan of this syntax. I think the syntax should be more similar to the ordinary markdown link syntax. Maybe something like:

[A link](/path/to/page)

(here we assume that any link beginning with / is a cross-reference to another page in the Sphinx directory, relative to the source directory. In sphinx, a link starting with / is considered a path from the root.)

Does something like this seem like a good idea? In general, adding syntax rules to Markdown is frowned upon, but this one might be worth it. I can't see how you could make an entire readthedocs site in markdown with using relative references.

can not get the anchor of titles all in Chinese

Thanks to your great works, I can use Sphinx with markdown.
But I run into a problem soon, that the doc made with Sphinx and recommonmark can not get a anchor of a pure Chinese title, i.e., can not navigate to the title with clicking sidebar item. And it will work after being translated into rst file with Pandoc. e.g. in a MD file:

# 学习

//this one can not get its anchor 

# 学习learn

//this one works 

# learn

//this one works 

&trade; is being wrapped in <p> tags

When building from a markdown file that has &trade; to show the trademark symbol ™, it builds it by wrapping it in <p> tags, so the ™ is brought down to a new "paragraph" instead of sitting next to the word it is meant to be by.

For example:

...on for QIIME&trade; 2 while w... builds as:

Impossible to get recommonmark to work with sphinx

it might not directly be a bug, but an issue using recommonmark: I just cannot get it to work! It parses all my markdown files like it is ReST text… And I cannot find why it's not working.

Though as I've looked up through every bit of RTFM available, I thought it could be a good idea to post here so at least there's a place where it gets documented.

When an answer is so hard to find for an issue, I know it usually means it's a PEBCAK issue, and there's something very stupid I forgot to do or setup, and I'll feel stupid when we'll find that. But still, I cannot find what that is so…

A summary of what I've done:

So please, please, can anybody tell me what I'm doing wrong here?

N.B.: I use python3 only (did not try python2).

Included toctree includes also arbitrary links in the same document

Given I have conf.py as following (incomplete):

from recommonmark.parser import CommonMarkParser
from recommonmark.transform import AutoStructify

source_suffix = '.md'
source_parsers = {'.md': CommonMarkParser}

master_doc = 'index'

def setup(app):
    app.add_config_value('recommonmark_config', {
        'enable_eval_rst': True,
    }, True)
    app.add_transform(AutoStructify)

And I have document index.md as following (I inserted spaces in between the backticks of the fenced code block so I could actually put it here, but the original document has no spaces there):

# Dredd — HTTP API Testing Framework

### Supported API Description Formats

- [API Blueprint][...]
- [Swagger][...]

## Contents

` ` `eval_rst
.. toctree::
   :maxdepth: 1

   Installation <installation>
   Quickstart <quickstart>
   How It Works <how-it-works>
   How-To Guides <how-to-guides>
   Usage: CLI <usage-cli>
   Usage: JavaScript <usage-js>
   About Hooks <hooks>
   Hooks: Go <hooks-go>
   Hooks: JavaScript (Sandboxed) <hooks-js-sandbox>
   Hooks: Node.js <hooks-nodejs>
   Hooks: Perl <hooks-perl>
   Hooks: PHP <hooks-php>
   Hooks: Python <hooks-python>
   Hooks: Ruby <hooks-ruby>
   Other Languages <hooks-new-language>
   Data Structures <data-structures>
   Contributing <contributing>
` ` `

## Useful Links

- [GitHub Repository][...]
- [Bug Tracker][...]
- [Changelog][...]

## Example Applications

- [Express.js](http://github.com/apiaryio/dredd-example)
- [Ruby on Rails](https://gitlab.com/theodorton/dredd-test-rails/)

Then the ToC works perfectly for all other documents, but it includes also links from this index page:

image

image

I tried the enable_auto_toc_tree option, but got similar or worse results.

Bold links not possible

After merging PR #63 links written in bold aren't supported anymore.

Example input:

**[A bold link](http://example.com)**

Results in an uncaught exception:

Error
Traceback (most recent call last):
  File "/usr/lib/python3.5/unittest/case.py", line 59, in testPartExecutor
    yield
  File "/usr/lib/python3.5/unittest/case.py", line 597, in run
    self.setUp()
  File "/home/projects/CMS/recommonmark/tests/test_sphinx.py", line 50, in setUp
    self.app.build(force_all=True)
  File "/usr/local/lib/python3.5/dist-packages/sphinx/application.py", line 327, in build
    self.builder.build_all()
  File "/usr/local/lib/python3.5/dist-packages/sphinx/builders/__init__.py", line 211, in build_all
    self.build(None, summary='all source files', method='all')
  File "/usr/local/lib/python3.5/dist-packages/sphinx/builders/__init__.py", line 265, in build
    self.doctreedir, self.app))
  File "/usr/local/lib/python3.5/dist-packages/sphinx/environment/__init__.py", line 556, in update
    self._read_serial(docnames, app)
  File "/usr/local/lib/python3.5/dist-packages/sphinx/environment/__init__.py", line 576, in _read_serial
    self.read_doc(docname, app)
  File "/usr/local/lib/python3.5/dist-packages/sphinx/environment/__init__.py", line 684, in read_doc
    pub.publish()
  File "/usr/lib/python3/dist-packages/docutils/core.py", line 217, in publish
    self.settings)
  File "/usr/local/lib/python3.5/dist-packages/sphinx/io.py", line 55, in read
    self.parse()
  File "/usr/lib/python3/dist-packages/docutils/readers/__init__.py", line 78, in parse
    self.parser.parse(self.input, document)
  File "/home/projects/CMS/recommonmark/recommonmark/parser.py", line 36, in parse
    self.convert_ast(ast)
  File "/home/projects/CMS/recommonmark/recommonmark/parser.py", line 47, in convert_ast
    fn(node)
  File "/home/projects/CMS/recommonmark/recommonmark/parser.py", line 134, in visit_link
    else mdnode.parent.sourcepos[0][0])
TypeError: 'NoneType' object is not subscriptable

Adding a space between ** and the link won't cause an error, but the output is not shown as expected.

Example input:

** [A bold link](http://example.com) **

Output (HTML):

<p>** <a class="reference external" href="http://example.com">A bold link</a> **</p>

Cannot set anchor to the section when using multibyte languages

When you write section like

## First Section

After sphinx-build, href="#first-section" appears in the anchor.

However like in Japanese,

## 第1章

This ends up in href="#" and I cannot jump to each sections.

This caused by here in the section method in parser.py

name = nodes.fully_normalize_name(title_node.astext())

astext() might remove non-ascii characters.

For the moment, I changed this part using url encode like
(Actually I changed the file from pip package, older version)

from future.moves.urllib.parse import quote
...
name = quote(' '.join(block.strings))

and it seems working.
(But not so beautiful...ended up a lot of hyphens, so I will use short random value)

Is there any better way ?

Push git tags to GitHub

I wasn't sure when the AutoStructify stuff was added and couldn't easily find which commit was released.

Shorthand style for embedding reStructuredText not working

I'm finding that the long-hand version for embedding reStructuredText works fine, but the short-hand version doesn't get processed so it is instead rendered as a regular code block. For example...

    ## Works Perfectly

    ```eval_rst
    .. important:: It's a note! in markdown!
    ```

    ## Does Not Work

    ``` important:: It's a note! in markdown!
    ```

The compiler reports the following for the line with the short-hand synax:

WARNING: Pygments lexer name u'important:: Its a note! in markdown!' is not known

CommonMark 0.6.0 breaks compatibility

Hi, it seems CommonMark (which was uploaded yesterday to pypi) breaks compatibility with this package. The error:

>>> from recommonmark.parser import CommonMarkParser
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/manuelmiranda/.virtualenvs/docs/lib/python2.7/site-packages/recommonmark/parser.py", line 9, in <module>
    from CommonMark import DocParser, HTMLRenderer
ImportError: cannot import name DocParser

Forcing the installation of 0.5.4 works again. Tested with both 0.2.0 and 0.1.1 versions.

viewcode utf-8 clash

 File "/Users/xxxxx/LIB/CONDA/anaconda/lib/python2.7/site-packages/recommonmark/states.py", line 129, in run_role
    rawtext=str(content),
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-1: ordinal not in range(128)

you can changerecommonmark/states.pylike this
rawtext=str(content), text=str(content),

to

 ```
rawtext=str(content.encode("utf-8")).decode("utf-8"),
text=str(content.encode("utf-8")).decode("utf-8"),
```

Non-url links are not treated as cross-references

According to the readme:

For all links in commonmark that aren't explicit URLs, they are treated as cross references with the :any: role. This allows referencing a lot of things including files, labels, and even objects in the loaded domain.

However, I can't get this markdown link.

[link](link-target)

to cross-reference the label in an .rst file

.. _`link-target`:

Recommonmark is treating link-target as a url instead of a cross reference.

recommonmark 0.4.0
sphinx 1.5.6

table of contents not working

This doesn't work in markdown documents:

```eval_rst
.. contents:: Table of Contents
  :depth: 3
```.

This error occurs:

ERROR: The "contents" directive may not be used within topics or body elements.

Incorrect links / non existing links break the make

Incorrect use of links doesn't report an error, it just breaks the make html process. For example:

[local-file]: local-file.md
[anchor-attempt]: #my-anchor

Leads to:

make html
sphinx-build -b html -d _build/doctrees   . _build/html
Running Sphinx v1.6.3
/usr/local/lib/python2.7/site-packages/sphinx/util/compat.py:40: RemovedInSphinx17Warning: sphinx.util.compat.Directive is deprecated and will be removed in Sphinx 1.7, please use docutils' instead.
  RemovedInSphinx17Warning)
loading pickled environment... done
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 1 source files that are out of date
updating environment: 0 added, 1 changed, 0 removed
reading sources... [100%] apm_tracing/java/enable-agent
Exception occurred:
  File "/usr/local/lib/python2.7/site-packages/recommonmark/states.py", line 134, in run_role
    content=content)
TypeError: 'NoneType' object is not callable
The full traceback has been saved in /var/folders/s5/8360xrrd33v03lx7s6klkyj80000gn/T/sphinx-err-rfEoU6.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
make: *** [html] Error 1

Traceback from /var/folders/s5/8360xrrd33v03lx7s6klkyj80000gn/T/sphinx-err-rfEoU6.log is:

  File "/usr/local/lib/python2.7/site-packages/sphinx/cmdline.py", line 306, in main
    app.build(opts.force_all, filenames)
  File "/usr/local/lib/python2.7/site-packages/sphinx/application.py", line 339, in build
    self.builder.build_update()
  File "/usr/local/lib/python2.7/site-packages/sphinx/builders/__init__.py", line 331, in build_update
    'out of date' % len(to_build))
  File "/usr/local/lib/python2.7/site-packages/sphinx/builders/__init__.py", line 344, in build
    updated_docnames = set(self.env.update(self.config, self.srcdir, self.doctreedir))
  File "/usr/local/lib/python2.7/site-packages/sphinx/environment/__init__.py", line 583, in update
    self._read_serial(docnames, self.app)
  File "/usr/local/lib/python2.7/site-packages/sphinx/environment/__init__.py", line 602, in _read_serial
    self.read_doc(docname, app)
  File "/usr/local/lib/python2.7/site-packages/sphinx/environment/__init__.py", line 723, in read_doc
    pub.publish()
  File "/usr/local/lib/python2.7/site-packages/docutils/core.py", line 218, in publish
    self.apply_transforms()
  File "/usr/local/lib/python2.7/site-packages/docutils/core.py", line 199, in apply_transforms
    self.document.transformer.apply_transforms()
  File "/usr/local/lib/python2.7/site-packages/docutils/transforms/__init__.py", line 171, in apply_transforms
    transform.apply(**kwargs)
  File "/usr/local/lib/python2.7/site-packages/recommonmark/transform.py", line 325, in apply
    self.traverse(self.document)
  File "/usr/local/lib/python2.7/site-packages/recommonmark/transform.py", line 297, in traverse
    self.traverse(child)
  File "/usr/local/lib/python2.7/site-packages/recommonmark/transform.py", line 297, in traverse
    self.traverse(child)
  File "/usr/local/lib/python2.7/site-packages/recommonmark/transform.py", line 287, in traverse
    newnode = self.find_replace(c)
  File "/usr/local/lib/python2.7/site-packages/recommonmark/transform.py", line 267, in find_replace
    newnode = self.auto_doc_ref(node)
  File "/usr/local/lib/python2.7/site-packages/recommonmark/transform.py", line 175, in auto_doc_ref
    return self.state_machine.run_role('doc', content=content)
  File "/usr/local/lib/python2.7/site-packages/recommonmark/states.py", line 134, in run_role
    content=content)
TypeError: 'NoneType' object is not callable```

Is commonmark dependency still necessary?

Hi! I'm submitting a conda-forge recipe for recommonmark, and we noticed that the recommonmark needs commonmark <= 0.5.4. The latest version of commonmark, already available on conda-forge, is 0.7+. Is it still required to use commonmark <= 0.5.4?

image code broken

The pypi version works fine.

However, fter installing the latest recommonmark this commit on GitHub by:

pip install git+https://github.com/rtfd/recommonmark

The image code gets broken:

![alt text](images/example.png)

is translated into

<p><img alt="_images/example.png" src="_images/example.png" />alt text</p>

instead of the correct one:

<img alt="alt text" src="_images/example.png" />

Support tables

docutils has some table support, would be nice to provide a kramdown compatible table support.

TOC tree doesn't build on Windows environment

When building docs using Sphinx and markdown, on Linux (Ubuntu) the TOC builds just fine but on Windows it doesn't build at all.

This issue applies when the file structure has nested folders.
(i.e. folder/file.md or folder1/folder2/file.md)

missing git tags for releases

It would be great if we can get the git tags for the according recommonmark releases like 0.4.0 so distro packages can build docs and also run some tests.
If this is possible, please keep in mind to also push future release tags 😋

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.