jj/docs
Yuya Nishihara 0656409904 templater: make .substr() be byte-index based, round towards origin
I'm going to add string.len() method which will return a length in bytes. The
number of the UTF-8 code points is useless metrics, and strings here are often
ASCII bytes, so let's simply use byte indices in substr().

If the given index is not at a char boundary, it will be rounded. I considered
making it an error, but that would be annoying. I would want to see something
printed by author.name().substr() even if it contained latin characters.

I've extracted index normalization function which might be used by other string
methods. The remaining part of substr() is trivial, so inlined it.
2024-03-01 08:51:20 +09:00
..
design sparse-v2: design doc proposition for Sparse Patterns refactoring 2024-02-01 16:02:14 -08:00
technical docs: update description of conflicts to be about tree-level conflicts 2023-11-30 14:24:48 -08:00
branches.md cli branch list: list tracked branches 2024-02-26 01:05:07 +00:00
cli-reference.md docs, CLI reference: use include-markdown instead of a symlink 2024-02-12 10:28:09 -08:00
code-of-conduct.md Replace contact method with addresses of active leads. 2023-11-28 13:48:22 -05:00
config.md sign: Update documentation 2024-02-20 00:02:08 +00:00
config.toml docs: document git.fetch and git.push config options 2024-02-09 12:03:42 -06:00
conflicts.md docs: indent conflict marker examples to not confuse tools 2022-12-12 16:20:40 -08:00
contributing.md rust: bump MSRV to 1.76.0 2024-02-09 15:48:01 -06:00
FAQ.md docs: Add FAQ item for git log 2024-02-06 15:03:51 -07:00
git-comparison.md cli: unblock "jj git init --colocate" in existing Git repo directory 2024-02-28 09:03:16 +09:00
git-compatibility.md docs: update remaining references on "jj init --git-repo" 2024-02-28 09:03:16 +09:00
github.md cli: unblock "jj git init --colocate" in existing Git repo directory 2024-02-28 09:03:16 +09:00
glossary.md docs branches.md: insert definitions for related terms 2024-01-24 18:47:17 -08:00
index.md docs index.md: explain that the website sidebar may be hidden 2023-10-04 05:25:37 -07:00
install-and-setup.md completion: Add support for Nushell completions 2024-02-18 19:08:38 +01:00
operation-log.md op_walk: add support for op_id+ (children) operator 2024-01-02 10:30:08 +09:00
related-work.md docs: add doc comparing jj to Sapling (#1708) 2023-06-28 06:56:57 +02:00
revsets.md revset: disable parsing rules of legacy dag range operator 2024-02-14 10:04:56 +09:00
sapling-comparison.md mkdocs: make MkDocs work with more GitHub-like list formatting 2023-11-03 19:15:37 -07:00
templates.md templater: make .substr() be byte-index based, round towards origin 2024-03-01 08:51:20 +09:00
testimonials.md docs: Add a Testmonials page. 2024-02-25 14:20:33 +01:00
tutorial.md cli: deprecate jj checkout 2024-02-03 17:21:56 -06:00
windows.md docs: add guidance for handling CRLF on Windows 2024-02-26 10:06:06 -08:00
working-copy.md workspace: add a root subcommand to print the workspace root path 2023-01-24 16:53:54 +01:00