the sidebar treats the first chapter as an alias for index.html, but a README chapter placed later in SUMMARY.md generates index.html itself, so both entries were marked active. Skip the alias when a chapter already links to index.html. Fixes#2883.
parse_quoted_path now takes the input right after the opening quote,
both callers strip it with strip_prefix. Rewrite the quoted-path tests
as plain assertion tests and drop the noisy banner comments.
Signed-off-by: Alex Chen <l46983284@gmail.com>
A quoted path like " spaces " keeps its whitespace characters
verbatim; nothing is trimmed inside quotes.
Signed-off-by: Alex Chen <l46983284@gmail.com>
- Extract parse_quoted_or_plain to eliminate duplication between
parse_include_path and parse_rustdoc_include_path
- Only \" and \\ are escapes; other \X preserves the backslash
so Windows paths like C:\Users\file.md work correctly
- Remove trim_start inside parse_quoted_path: whitespace inside
quotes is part of the path
- Trailing backslash (\ at end of quoted string) is now an error
- Add 44 architectural, escape-semantics, and cross-platform tests
Signed-off-by: Alex Chen <l46983284@gmail.com>
Require double quotes for file paths containing spaces across
include, rustdoc_include, and playground directives. Preserve full
backwards compatibility for unquoted paths without spaces, and
support escaped quotes inside paths.
Signed-off-by: Alex Chen <l46983284@gmail.com>
Parse the full include/rustdoc_include target instead of splitting on
whitespace, so paths like `fila a.md` work. Line ranges still work
(`fila a.md:1:2`). Playground links keep whitespace-separated properties.
Fixes#2812.
Signed-off-by: Alex Chen <l46983284@gmail.com>
Adds tests for multiline includes in the following markdown scenarios:
- Admonitions
- Admonitions nested in blockquotes
- Unordered lists
- Ordered lists
Reorganizes the existing mdBook test page for multiline includes to
accommodate the above.
Moves the expected testsuite page for multiline includes from the test
code string into a separate file in anticipation of additional tests for
this feature.
Cover the extra cases raised in review: a punctuation-only heading
that keeps counting into the section fallback (section-2/section-3)
and a punctuation-only heading with an explicit {#id} that overrides
the fallback.