summaryrefslogtreecommitdiff
path: root/sphinx/domains/javascript.py
Commit message (Collapse)AuthorAgeFilesLines
* Allow multi-line object description signatures (#11011)TLouf2023-05-111-3/+14
| | | | | Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com> Co-authored-by: Jean-François B <2589111+jfbu@users.noreply.github.com> Co-authored-by: TLouf <loufthomas@gmail.com>
* Remove deprecated ``make_old_id`` functions (#11360)Adam Turner2023-04-271-16/+0
|
* Fix COM812Adam Turner2023-02-181-3/+3
|
* Add ``content_offset`` parameter to ``nested_parse_with_titles`` (#11147)Jeremy Maitin-Shepard2023-02-151-5/+4
| | | | | | | | | | | | | | | | | | | | | | | Previously, ``nested_parse_with_titles`` always passed ``0`` as the input offset when invoking ``nested_parse``. When parsing the content of a directive, as is a common use case for ``nested_parse_with_titles``, this leads to incorrect source file/line number information, as it does not take into account the directive's ``content_offset``, which is always non-zero. This issue affects *all* object descriptions due to GH-10887. It also affects the ``sphinx.ext.ifconfig`` extension. The ``py:module`` and ``js:module`` directives employed a workaround for this issue, by wrapping the calls to ``nested_parse_with_title`` with ``switch_source_input``. That worked, but was more complicated (and likely less efficient) than necessary. This commit adds an optional ``content_offset`` parameter to ``nested_parse_with_titles``, and fixes callers to pass the appropriate content offset when needed. This commit eliminates the now-unnecessary calls to ``switch_source_input`` and instead specifies the correct ``content_offset``.
* De-glob mypy whitelist for 'sphinx.domains.*' (#11064)danieleades2023-01-021-4/+11
| | | Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* Use PEP 604 typesAdam Turner2023-01-011-2/+2
|
* Use PEP 595 typesAdam Turner2023-01-011-18/+18
|
* Insert ``from __future__ import annotations``Adam Turner2023-01-011-0/+2
|
* Finer grained control over domain ToC entries (#10886)Adam Turner2022-09-301-1/+3
| | | | | - Implement `:nocontentsentry:` flag - Use `:nocontentsentry:` in docs - Add domain object table of contents configuration option
* Restore anchor links to top of module docstringAdam Turner2022-09-271-1/+2
|
* Add contents entries for domain objects (#10807)Adam Turner2022-09-131-4/+41
| | | | | | | | | - Add entries in the table of contents for domain objects (e.g. `py:function`, `rst:role`, etc). Supported domains are Javascript, Python, and reStructuredText. - Support content in `py:module` and `js:module` directives. - Add the `noindexentry` and `noindex` flags to more domains. - Add `toc_object_entries_show_parents` configuration setting - Update documentation and tests
* Remove deprecated code for Sphinx 5.0Adam Turner2022-04-171-14/+0
|
* Collapse single line docstringsAdam Turner2022-02-201-2/+1
|
* Remove copyright and licence fieldsAdam Turner2022-02-201-3/+0
|
* Fix module docstring indentationAdam Turner2022-02-201-2/+2
|
* Fix module docstring first lineAdam Turner2022-02-201-2/+1
|
* Remove module titles in docstringsAdam Turner2022-02-191-3/+0
|
* address some unused loop control variables (B007)Daniel Eades2022-01-121-2/+2
|
* A happy new year!Takeshi KOMIYA2022-01-011-1/+1
|
* js nodes, nodes.Node -> NodeJakob Lykke Andersen2021-10-031-2/+2
|
* js nodes, update CHANGES and rename variableJakob Lykke Andersen2021-10-031-5/+5
|
* js nodes, update name renderingJakob Lykke Andersen2021-10-031-1/+1
|
* js nodes, update prefix renderingJakob Lykke Andersen2021-10-031-2/+11
|
* js nodes, update display_prefixJakob Lykke Andersen2021-10-031-7/+12
|
* js, use func role for exception fieldJakob Lykke Andersen2021-06-031-1/+1
| | | | The err role doesn't exist and the rest are all equivalent.
* refactor: Add Optional to type annotationsTakeshi KOMIYA2021-05-101-2/+2
|
* refactor: Use PEP-526 based variable annotation (sphinx.domains)Takeshi KOMIYA2021-03-231-4/+4
|
* refactor: Add a type alias for the option_spec of directives; OptionSpecTakeshi KOMIYA2021-03-131-2/+3
|
* refactor: Update typehints for ObjectDescription using GenericTakeshi KOMIYA2021-01-031-1/+1
|
* A happy new year!Takeshi KOMIYA2021-01-011-1/+1
| | | | | | | .. note:: $ find sphinx tests LICENSE doc/conf.py -type f -exec sed -i '' -e 's/2007\-20../2007-2021/' {} \; $ git co sphinx/locale/**/*.js sphinx/templates/epub3/mimetype
* Sort imports with isortFrançois Freitag2020-11-111-3/+1
| | | | | | | | | | | | Keep imports alphabetically sorted and their order homogeneous across Python source files. The isort project has more feature and is more active than the flake8-import-order plugin. Most issues caught were simply import ordering from the same module. Where imports were purposefully placed out of order, tag with isort:skip.
* fix typoTetsuo Koyama2020-07-191-1/+1
|
* Add :noindexentry: optionJakob Lykke Andersen2020-07-041-3/+9
| | | | Fixes sphinx-doc/sphinx#7052
* refactor: js domain: Change make_old_*_id() to methodsTakeshi KOMIYA2020-03-011-20/+18
|
* js domain: Generate node_id for objects in the right wayTakeshi KOMIYA2020-03-011-26/+39
|
* js domain: Show better duplication warning messageTakeshi KOMIYA2020-03-011-2/+2
|
* js domain: Generate node_id for modules in the right wayTakeshi KOMIYA2020-03-011-17/+32
|
* refactor: Set source_info to nodesTakeshi KOMIYA2020-02-291-2/+1
|
* Deprecate desc_signature['first']Takeshi KOMIYA2020-02-091-1/+0
|
* A happy new year!Takeshi KOMIYA2020-01-011-1/+1
|
* Replace `a and b or c` by the more legible `b if a or c`.Antony Lee2019-12-211-2/+2
|
* refactor: Add data accessors to JavaScriptDomainTakeshi KOMIYA2019-06-301-24/+44
|
* Migrate to py3 style type annotation: sphinx.domains.javascriptTakeshi KOMIYA2019-06-301-40/+30
|
* Clean up import for annotationsTakeshi KOMIYA2019-03-061-1/+0
|
* Merge branch '1.8'Takeshi KOMIYA2019-01-021-1/+1
|\
| * A happy new year!Takeshi KOMIYA2019-01-021-1/+1
| |
* | Remove unnecessary encoding cookie from Python source filesJon Dufresne2018-12-161-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In Python 3, the default encoding of source files is utf-8. The encoding cookie is now unnecessary and redundant so remove it. For more details, see the docs: https://docs.python.org/3/howto/unicode.html#the-string-type > The default encoding for Python source code is UTF-8, so you can > simply include a Unicode character in a string literal ... Includes a fix for the flake8 header checks to stop expecting an encoding cookie.
* | Replace all "unicode" type by "str"Takeshi KOMIYA2018-12-151-15/+14
| |
* | Fix annotations of process_link()Takeshi KOMIYA2018-12-031-1/+1
| |
* | Fix annotations for Directives (Replace N_co with nodes.Node)Takeshi KOMIYA2018-12-011-3/+3
| |