Andrey Makarov
0e44d137f9
rm redundant blank lines before literal blocks ( #18465 )
2021-07-08 20:24:57 -04:00
Bung
16f0b55664
remove isKeywordIgnoreCase from highlite, not used , can't even compile with -d:useNimRtl ( #18399 )
2021-06-30 07:28:41 +02:00
Andrey Makarov
1b9b806007
rst: fix bug 20 from #17340 ( #18360 )
...
and a leftover bug: priority of option list inside definition list
2021-06-26 18:10:46 +02:00
Andrey Makarov
0c8d3ae985
rst: allow comment to continue on second line ( #18338 )
2021-06-24 10:28:28 +02:00
Andrey Makarov
9c43f05099
Markdown: allow to end URL with balanced parenthesis ( #18321 )
...
* Markdown: allow to end URL with balanced parenthesis
* Update lib/packages/docutils/rst.nim
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
* apply suggestion
* remove unnecessary if
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
2021-06-23 07:50:05 +02:00
Andrey Makarov
1b3c0f142d
validate rst field for :number-lines:, :status: ( #18304 )
2021-06-20 20:00:42 +02:00
Andrey Makarov
590d457631
docgen: move to shared RST state ( fix #16990 ) ( #18256 )
...
* docgen: move to shared RST state (fix #16990 )
* Update lib/packages/docutils/rst.nim
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
* Update lib/packages/docutils/rst.nim
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
* Update lib/packages/docutils/rst.nim
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
* Update compiler/docgen.nim
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
* Update compiler/docgen.nim
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
* Update compiler/docgen.nim
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
* Update lib/packages/docutils/rst.nim
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
* rename `cmdDoc2` to `cmdDoc`
* fix (P)RstSharedState convention
* new style of initialization
* misc suggestions
* 1 more rename
* fix a regression
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
2021-06-20 09:50:03 +02:00
Andrey Makarov
9c0666e0bb
rst: remove roSkipPounds option ( #18175 )
2021-06-05 09:12:37 +02:00
Andrey Makarov
ba3ec7b049
docs: Latex generation improvements ( #18141 )
...
* docs: improve Latex generation
* make it work on Windows + fix ] escaping
* minor fixes with escapes and style
2021-06-01 20:47:23 +02:00
Andrey Makarov
9f7e2e3057
docs: make inline markup more compatible with Markdown ( #18053 )
...
fixes https://github.com/timotheecour/Nim/issues/739
2021-05-21 06:54:20 +02:00
Andrey Makarov
2096490b59
follow-up #17930 - inline syntax highlighting ( #18013 )
...
* follow-up #17930 - inline syntax highlighting
* make closure->nimcall
2021-05-16 23:55:14 +02:00
Andrey Makarov
3824fd3f9a
RST opt.list to have priority over def.list ( #17845 )
2021-05-15 08:12:26 +02:00
Andrey Makarov
97970d9dcc
doc2tex: generate docs to Latex (#17997 )
...
* `doc2tex`: generate docs to Latex
* address some comments
2021-05-14 07:30:47 +02:00
Andrey Makarov
436af88d8c
follow-up #17837 : add Console for interactive sessions ( #17930 )
...
* follow-up #17837 : add `Console` for interactive sessions
* fix Latex
2021-05-06 10:58:01 +02:00
Andrey Makarov
287f1170ba
highlite: fix #17890 - tokenize Nim escape seq-s ( #17919 )
...
* highlite: fix #17890 - tokenize Nim escape seq-s
* Update tests/stdlib/thighlite.nim
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
2021-05-03 10:21:36 +02:00
Andrey Makarov
abb8a73134
Fix nim-lang/nimforum#285 - punctuation after URL ( #17908 )
...
* Fix nim-lang/nimforum#285 - punctuation after URL
* keep only one leaf in a rnStandaloneHyperlink
* add more complex URL
2021-05-01 07:20:33 +02:00
Timothee Cour
3192995ac9
close #16646 ; since now works with bootstrap nim post csources_v1 ( #17895 )
...
* revive #16627 now that csources_v1 was merged
* use dedent in rst.nim, refs https://github.com/nim-lang/Nim/pull/17257#discussion_r589025683
* fix test and improve rendering of a rst warning
2021-04-30 18:54:47 +02:00
Andrey Makarov
1640508348
more strict RST inline markup parsing ( #17827 )
...
* more strict RST inline markup parsing
* add test for unexpected bonus
* introduce `roPreferMarkdown`
2021-04-29 17:31:15 +02:00
Andrey Makarov
8f79bc5f3d
add RST highlighting for command line / shells (also fixes #16858 ) ( #17789 )
2021-04-21 16:57:54 +02:00
Andrey Makarov
f8dce493d3
rst indentation fixes (ref #17340 ) ( #17715 )
2021-04-15 08:12:44 +02:00
Andrey Makarov
2150cd1826
restyle RST option lists ( #17637 )
...
* WIP: restyle RST option lists
* apply similar style to Latex
* fix tests
* minor visual tweaks
* update tests
* remove leftover comments
2021-04-10 09:49:01 +02:00
Andrey Makarov
42687457b0
further progress on rst roles & directives ( fix #17646 ) ( #17659 )
...
* further progress on rst roles & dir-s (fix #17646 )
* fix documents according to the messages
* fix bug 17 from #17340
2021-04-08 19:00:14 +02:00
Andrey Makarov
ca405167ed
fix :number-lines: regression ( #17639 )
2021-04-05 08:33:06 +02:00
Andrey Makarov
f02e159b56
fix rst option list at EOF (follow-up #17442 ) ( #17638 )
2021-04-04 11:54:26 -07:00
Andrey Makarov
e35946f306
enable syntax highlighting for inline code ( #17585 )
...
* enable syntax highlighting for inline code
* finish '.. default-role' and preliminary '.. role'
implementation
* more compact check in dirRole
* set :literal: as default role for *.rst
* Update lib/packages/docutils/rst.nim
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
* use whichRole for setting currRoleKind
* Update lib/packages/docutils/rst.nim
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
* rename rnGeneralRole -> rnUnknownRole
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
2021-04-02 22:11:44 +02:00
Andrey Makarov
861c42c258
RST: enable parsing of prefix roles (ref #17340 ) ( #17514 )
2021-03-29 18:32:49 +02:00
Timothee Cour
8b26b3ad0d
remove docutils.nimble (not a real nimble package, and affected canonical imports) ( #17544 )
...
* remove docutils.nimble (not a real nimble package, and affected canonical imports)
* cleanup redundant references
2021-03-29 12:46:53 +02:00
Andrey Makarov
46364e63cd
fix RST parsing after option lists ( #17442 )
2021-03-25 08:15:05 +01:00
Timothee Cour
1590d14575
fix #17260 render \ properly in nim doc, rst2html ( #17315 )
2021-03-24 10:58:29 +01:00
Andrey Makarov
4bfc5a9551
Rst test check messages ( fix #17280 ) ( #17338 )
2021-03-17 20:13:04 +01:00
Andrey Makarov
144e338abb
allow short-style rst references with symbols ( #17372 )
2021-03-17 18:08:13 +01:00
Andrey Makarov
d97bf4f1c8
fix RST parsing when no indent after enum.item ( fix #17249 ) ( #17257 )
2021-03-12 08:33:21 +01:00
Clyybber
507873be25
Use readable escape sequences ( #17241 )
2021-03-03 07:15:07 +01:00
Andrey Makarov
02f4464058
RST heading improvements ( fix #17091 ) ( #17195 )
2021-03-02 16:41:10 +01:00
Danil Yarantsev
285539c87a
Replace double backticks with single backticks - Part 4 out of ~7 ( #17216 )
2021-03-01 18:00:58 -08:00
Timothee Cour
ff3ace2232
fix code-block test bugs: fix #17183 , fix https://github.com/timotheecour/Nim/issues/620 ( #17184 )
...
* fix code-block test bugs: fix #17183 , fix https://github.com/timotheecour/Nim/issues/620
* cleanup
2021-02-26 16:05:20 +01:00
Andrey Makarov
fab1618eb4
make rst.nim use object variant ( #17138 )
...
* make rst.nim use object variant
* add workaround
* fix mistake
2021-02-22 11:00:31 +01:00
Andrey Makarov
d1fec552d0
stricter checks for RST headlines ( #17089 )
2021-02-20 18:01:45 +01:00
Andrey Makarov
35bd39a9d0
RST: implement footnotes and citations ( #16960 )
...
* RST: implement footnotes and citations
* manual fixup of nimdoc.out.css
* remove unused code
* shorter printing code
* Update lib/packages/docutils/rst.nim
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2021-02-15 14:12:40 +01:00
Timothee Cour
190fe36eba
rst: single backticks now render correctly in both rst2html and github ( #17028 )
...
* rst: `` => `
* support default-role in rst2html
* update docstyle regarding single vs double backticks
2021-02-13 09:30:23 +01:00
Andrey Makarov
8053ccde2f
parse RST headings when EOF follows them ( #17014 )
2021-02-12 15:08:09 +01:00
flywind
f140c92409
fix some warnings ( #16952 )
2021-02-08 13:50:15 +01:00
Andrey Makarov
fd5c8ef208
RST: implement internal targets ( #16614 )
2021-01-11 19:51:04 +01:00
Andrey Makarov
5984f7a7dd
RST: improve line blocks ( #16518 )
2020-12-31 11:20:04 +01:00
Andrey Makarov
e70ac0f34c
RST: fix directive with fields ( #16490 ) ( #16493 )
...
* RST: fix directive with fields (#16490 )
* Update tests/stdlib/trstgen.nim
Co-authored-by: Clyybber <darkmine956@gmail.com >
2020-12-29 03:32:11 +01:00
Andrey Makarov
2bdc479622
RST: implement admonitions ( #16438 )
2020-12-27 11:16:12 +01:00
Andrey Makarov
9674eb3ca6
RST enumlist followup ( #16382 )
...
* fix matching of enumerator #)
* RST: markdown list with auto-enumerator `1`
2020-12-19 10:33:10 +01:00
Andrey Makarov
e843492b13
doc/rst2html: some few fixes for enumerated and bullet lists ( #16295 )
...
* fix bullet/enumarated lists with many blank lines
* fix enumerated list parsing
* fix parse failure when next line after list empty
* implement arbitrary start of enumerator
* check that enumerators are in order
* remove redundant start=x if x=1 or a
* add some doc on implemented features
* update start in rst_examples.rst
* allow upper-case letters + more docs
2020-12-14 18:10:39 +01:00
Xabier Bello
4c533b2d92
Added Python to highlite module. ( #16286 )
...
* Added Python to highlite module.
* Added the keywords for Python
* Refactored the 'pythonLikeNextToken' into 'nimNextToken':
- `lang` property added to GeneralTokenizer object, is set in `getNextToken`.
- `nimNextToken` accepts `keywords` parameter, used for languages different
from Nim.
- Multiline comment available only for `langNim`.
2020-12-08 10:44:07 +01:00
Andrey Makarov
6877e0c8a3
RST tables: fix latex col number; allow less than three of = ( #16040 )
2020-12-04 08:50:17 +01:00