Commit graph

133 commits

Author SHA1 Message Date
Anthony
c410abb565 Merge pull request #63 from rtfd/commonmark-0.7.3
Update to support CommonMark >= 0.7.3 and clean up code
2017-05-03 15:30:47 -07:00
Anthony Johnson
e62f4039ea
Add missing inline code parsing 2017-03-23 14:13:47 -07:00
Anthony Johnson
bdd12f9bbc
Lint fix 2017-03-03 01:35:52 -08:00
Anthony Johnson
e30cd3f894
Fix py3 urllib call 2017-03-03 01:31:05 -08:00
Anthony Johnson
8baf238562
Fix linking, add tests, fix auto toc, deprecate and remove auto ref
This fixes link nesting, and resolves some issues around links not closing
correctly. There were a few changes required to support the autotoc feature, and
the auto ref feature has be deprecated. This feature no longer is required, as
we are doing pending_xref natively. The functionality was breaking Sphinx
altogether, so it doesn't make sense to keep it and deprecate the feature.
2017-03-03 01:20:23 -08:00
Anthony Johnson
1f7f525c7b
Port in pending_xref node changes to references
* Moves changes from #61 into this PR
* Drops basic testing from #61
* Adds to implementation pending_xref back down to reference

The implementation in #61 breaks a number of cases, like "/example" and
"example.html", etc. Instead of trying to enumerate case we want an xref instead
of a pending_xref, just pin the xref on the pending_xref to back down.
pending_xref replaces itself with it's children if the reference isn't resolved.
2017-03-02 20:04:30 -08:00
Anthony Johnson
fe8e00ab41
Update to support CommonMark >= 0.7.3 and clean up code
This was already dealing with a rewrite due to the spec change on CommonMark, so
I took the opportunity to modernize the code and clean things up as well.

* Updates to support CommonMark==0.7.3
* Reworks pattern for handling CommonMark nodes, mimic docutils visit/depart
  pattern
* Drops SectionHandler class, as it was only used in one place. Merge into the
  parser class, where it is used
* Drops requirements file for setup.py config, as this is a package requirements
  is superfluous
* Adds a number of more detailed test cases
* Adds test runner for 3.5, 3.6
* Updates strictness on prospector, cleans up linting errors and docstring
  problems
2017-03-02 20:04:30 -08:00
Eric Holscher
50be4978d7 Merge pull request #61 from pfultz2/pending-xref
Use pending_xref for links
2017-03-02 14:25:43 -08:00
Paul
c64958e5e8 Add info how links are handled in the doc 2017-02-23 16:45:27 -06:00
Paul
a551eed06c Add two blank lines for pep8 2017-02-07 19:17:58 -06:00
Paul
e9bac97518 Add a reference to the XRefRole class 2017-02-07 17:09:39 -06:00
Paul Fultz II
a9459aabfa Update sphinx version 2017-02-07 13:58:31 -06:00
Eric Holscher
81d7c6f7b3 Merge pull request #58 from pfultz2/nester-header-block
Add test for header nested in a block
2016-11-01 20:29:46 -07:00
Paul
6a22f6b04b Add test for header nested in a block 2016-10-27 01:17:06 -05:00
Eric Holscher
8ae002b040 Merge pull request #53 from kindly/fix-eval-rst
Fix eval_rst so it assigns source properly
2016-08-25 09:30:17 -07:00
Eric Holscher
b70d5f5224 Merge pull request #52 from kindly/master
Change priority to highest.
2016-08-25 09:29:43 -07:00
David Raznick
71631f1e2f Fix eval_rst so it assigns source properly
At the moment it is passing source as node.rawsource.  This is always
going to be the empty string as it is getting it from a newly created
node.

This patch saves a reference to the original node and parses down the
correct source.  This patch along with #52 means that eval_rst blocks will
internationalize correctly fixing [#47].  Sphinx will not translate
nodes with a blank source.
2016-08-25 13:35:28 +01:00
David Raznick
3b18390549 Change priority to highest.
Currently the priority for the Autostructify is set to 1000.  I think it
was the intention to set it so that it runs before any other transforms.
However the ordering in docutils is confusing and setting it to 1
actually means it will be run first.

This was causing a problem for i18n in sphinx as it would not translate
anything in ```eval_rst`` blocks or ``` directive:: ``` blocks as these were
not converted to the node tree before gettext was meant to translate
them.
2016-08-25 13:18:11 +01:00
Eric Holscher
e81b0a0de1 Merge pull request #48 from pfultz2/master
Transform files with other endings besides .md
2016-06-28 12:50:22 -07:00
Eric Holscher
5c64c77637 Merge pull request #49 from pfultz2/hilite-bug
Fix regression with highliting
2016-06-20 13:43:09 -07:00
Paul
b6440bf2c8 Fix pep8 problems 2016-06-14 12:03:24 -05:00
Paul
ad36e4990c Add support for external links 2016-06-14 01:16:46 -05:00
Paul
c9c58bcfc9 Use pending_xref for reference nodes 2016-06-13 23:14:35 -05:00
Paul
0ff83a9091 Add tests for checking custom file extensions 2016-06-12 03:12:15 -05:00
Paul
c98a939751 Merge branch 'master' into md-files 2016-06-11 08:50:17 -05:00
Paul
0eee19e600 Add tests for checking that pygments will still highlight the code. This requires a newer version sphinx as well. 2016-06-10 21:08:31 -05:00
Paul
391bbe4e68 Remove pep8 whitespace 2016-06-06 23:56:37 -05:00
Paul
40a82ef39d Fix regression with highliting 2016-06-06 23:51:20 -05:00
Paul
74e0566dbf Transform files with other endings besides .md 2016-06-06 21:39:21 -05:00
Eric Holscher
da77951476 Merge pull request #44 from mgeier/code-blocks
Fix code blocks
2016-04-24 19:14:54 -07:00
Eric Holscher
842dde424b Merge pull request #43 from mgeier/sphinx-extension
Turn package into a Sphinx extension
2016-04-24 19:14:45 -07:00
Eric Holscher
13905f0d62 Merge pull request #42 from mgeier/manifest
Add MANIFEST.in
2016-04-24 19:14:33 -07:00
Matthias Geier
ebedf5ef62 DOC: Properly escape inline code and code blocks 2016-04-24 14:01:31 +02:00
Matthias Geier
e610f57354 Show proper code blocks if no language is given 2016-04-24 13:58:56 +02:00
Matthias Geier
7584516df2 Turn package into a Sphinx extension 2016-04-24 12:32:25 +02:00
Matthias Geier
8f5c0106ac Add MANIFEST.in
This fixes #28.
2016-04-24 11:10:04 +02:00
Eric Holscher
5ce70fb0d2 Merge pull request #40 from JimiC/Path-Separator-Handler
Added path separator handler for non-Unix environment.
2016-04-07 11:55:15 -07:00
JimiC
bcaf40e078 Removing trailing whitespace and blank line. 2016-04-06 18:44:13 +03:00
JimiC
f2dedeaeaa Added path separator handler for non-Unix environment. 2016-04-06 18:23:58 +03:00
Eric Holscher
8a3b8f856e Merge pull request #37 from mkcode/improve-readme
Improve readme
2016-03-10 15:24:53 -08:00
Chris Ewald
908c6669ef bold the option keys in the readme 2016-03-10 15:41:39 -05:00
Chris Ewald
3df81307d9 bold the option keys 2016-03-10 15:39:15 -05:00
Chris Ewald
b9d8455d68 fix grammer error 2016-03-10 15:36:32 -05:00
Chris Ewald
1a52eba1c7 add autostructify section to main readme 2016-03-10 15:36:12 -05:00
Eric Holscher
ee2c52035d Merge pull request #36 from mkcode/improve-rst-eval
Improve rst_eval
2016-03-10 11:29:39 -08:00
Chris Ewald
aa61efe5cb no need for a separate regex variable 2016-03-09 07:02:12 -05:00
Chris Ewald
a972f9b1f5 add docs and examples for new embedded rst style 2016-03-09 06:46:56 -05:00
Chris Ewald
85d0e49b67 rst directive parse shorthand and more compat
with the ```eval_rst style, blocks, certain directives such as 'sidebar'
failed with an error saying: "ERROR: The "sidebar" directive may not be
used within topics or body elements". The sidebar directive works using
this added style. The new style is: ```sidebar:: Sidebar title. The
double colon denotes that it is an rst directive and renders it
correctly. No code-block languages have double colons, so this is a safe
method to distinguish between code literals and rst directives.
2016-03-09 06:17:21 -05:00
Luca Barbato
f8ef2c2843 Merge pull request #32 from shimizukawa/master
Set rawsource value for each nodes
2016-02-08 16:41:09 +01:00
shimizukawa
fc18fa7431 Set rawsource value for each nodes to use as translation source on Sphinx i18n feature. 2016-02-08 22:48:21 +09:00