gffranco 18f1ddfe7f fix(lexer): don't split table cells on | inside links/code
The table-row lexer collected every `|` as a cell separator, so a pipe
inside a `[[url|title]]` wikilink (or `{{…}}` transclusion / `` `…` ``
inline code) was mistaken for a column boundary — mangling the link and
adding a phantom column in the AST and HTML export.

Replace the naive scan in `try_lex_table_row` with `cell_bar_positions`,
which skips pipes inside those constructs (matching the regions
`lex_inline` tokenises as a unit). Unclosed constructs fall back to
literal openers so a malformed cell can't swallow the rest of the row,
and the scan only slices at ASCII openers to stay UTF-8 safe.

Backslash-escaped `\|` is intentionally left unhandled: the inline lexer
has no escape handling, so honouring it here would leave a stray
backslash in the output. Documented as a matched follow-up.

Adds lexer + HTML-export regression tests.

Closes #1

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lzhq43v1qpkZczN65dqXa3
2026-07-02 12:30:15 +00:00
2026-06-24 16:21:41 +00:00
2026-06-24 16:21:41 +00:00

nuwiki-rs

The Rust language server (nuwiki-ls) behind nuwiki, the vimwiki-compatible Vim/Neovim plugin.

Note

This repo is the server only. If you just want to use nuwiki in Vim/Neovim, install the plugin from gffranco/nuwiki — it downloads a prebuilt nuwiki-ls binary from this repo's releases automatically, so you don't need this repo or a Rust toolchain. Work here only to develop the parser / LSP / HTML renderer.

Crates

  • nuwiki-core — Vimwiki lexer, parser, AST, HTML renderer, and date utilities
  • nuwiki-lsp — Language Server Protocol implementation (tower-lsp)
  • nuwiki-ls — Binary entry point (stdio server bridge)

Quick Start

# Build
cargo build --release -p nuwiki-ls

# Run
cargo run --bin nuwiki-ls

# Tests
cargo test

License

Licensed under MIT or Apache-2.0, at your option. See LICENSE-MIT and LICENSE-APACHE.

S
Description
nuwiki language server and core library
Readme 294 KiB
v0.5.1 Latest
2026-07-02 12:30:57 +00:00
Languages
Rust 99.8%
Shell 0.2%