Metadata-Version: 2.4
Name: rbtr-lang-rst
Version: 2026.9.0.dev1
Summary: rbtr — reStructuredText language plugin
Keywords: code-search,code-index,tree-sitter,static-analysis,semantic-search,developer-tools,rst,restructuredtext
Author: Alejandro Giacometti
Author-email: Alejandro Giacometti <alejandro.giacometti@gmail.com>
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Text Processing :: Indexing
Classifier: Typing :: Typed
Requires-Dist: rbtr==2026.9.0.dev1
Requires-Dist: tree-sitter-rst
Requires-Python: >=3.13
Project-URL: Homepage, https://github.com/janrito/rbtr
Project-URL: Repository, https://github.com/janrito/rbtr
Project-URL: Documentation, https://github.com/janrito/rbtr/tree/main/packages/rbtr-lang-rst#readme
Project-URL: Issues, https://github.com/janrito/rbtr/issues
Project-URL: Changelog, https://github.com/janrito/rbtr/releases
Description-Content-Type: text/markdown

# rbtr-lang-rst

reStructuredText support for [rbtr]. A **default** plugin — installed
with rbtr itself (`pip install rbtr`).

[rbtr]: https://github.com/janrito/rbtr/tree/main/packages/rbtr#readme

## What it ingests

A custom chunker: it reconstructs the section hierarchy from the *order of
adornment characters* (RST has no fixed heading levels), each section a chunk
scoped by its ancestors. Cross-references are extracted as imports.

- **Sections** — headings (underline and overline adornments) → doc sections,
  with `scope` the `::` chain of enclosing sections. A document with no
  heading at all — a README, a changelog — gives each top-level block its own
  section instead: paragraphs, lists, directives, literal blocks, link
  targets.
- **References** — the `:func:` / `:class:` / `:meth:` / `:mod:` / `:doc:`
  roles, `` `text <target>`_ `` references, and `.. toctree::` entries →
  imports. External URLs and same-file anchors are skipped.

## Chunks produced

```rst
Title              doc_section "Title"
=====
Section            doc_section "Section", scope "Title"
-------
See :func:`helper` and :doc:`api/index`.
                   import {names: helper}; import {module: api/index}
```

## Embedded / injected chunks

None. RST does not embed other languages.

## Grammar & dependencies

Uses the `tree-sitter-rst` grammar. No runtime dependency on other language
plugins; the test suite dev-depends on `rbtr-lang-python` to extract the
sample's `helpers.py` and snapshot the `.rst → .py` reference edges.
