Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't work when #:lang is set to "scribble/manual" #13

Open
dented42 opened this issue Apr 16, 2024 · 1 comment
Open

Doesn't work when #:lang is set to "scribble/manual" #13

dented42 opened this issue Apr 16, 2024 · 1 comment

Comments

@dented42
Copy link

Using "scribble/manual" as the language for the code example doesn't seem to work. An exception related to string manipulation is raised instead.

#lang scribble/manual
@(require scribble-code-examples)
@code-examples[#:lang "scribble/manual" #:context #'here]|{@title{Thing}}|

The result is:

substring: ending index is smaller than starting index
  ending index: 22
  starting index: 35
  valid range: [0, 35]
  string: "#lang scribble/manual\n@title{Thing}"

It also does't work with "scribble/base", but "scribble/text" works as expected.

@dented42 dented42 changed the title Doesn't seem to work with scribble/manual Doesn't seem to work with "scribble/manual" Apr 16, 2024
@dented42 dented42 changed the title Doesn't seem to work with "scribble/manual" Doesn't seem to work with \"scribble/manual\" Apr 16, 2024
@dented42 dented42 changed the title Doesn't seem to work with \"scribble/manual\" Doesn't seem to work with scribble/manual Apr 16, 2024
@dented42 dented42 changed the title Doesn't seem to work with scribble/manual Doesn't work when #:lang is set to "scribble/manual" Apr 16, 2024
@AlexKnauth
Copy link
Owner

AlexKnauth commented Apr 17, 2024

I started a branch to work on this here:
https://github.com/AlexKnauth/scribble-code-examples/tree/issue-13

I can fix the substring error, but the results still aren't right, they look something like:

> @title{Thing}
(part #f (list (list 'part (generated-tag))) #f (style #f (list (document-version "8.12.0.14") (latex-defaults '(collects #"scribble" #"manual-prefix.tex") '(collects #"scribble" #"manual-style.tex") '()) (html-defaults '(collects #"scribble" #"scribble-prefix.html") '(collects #"scribble" #"manual-style.css") '((collects #"scribble" #"manual-fonts.css"))) (css-style-addition '(collects #"scribble" #"manual-racket.css")) (js-style-addition '(collects #"scribble" #"manual-racket.js")))) '() '() '())
>
"\n"
> @title{Thing}
(title-decl #f '((part "Thing")) #f (style #f '()) '("Thing"))

If I can find a consistent way to include the last @title{Thing} but discard the first two things one, that might be a good thing to implement. @default-kramer had some ideas that might be relevant in #10, so I'll start looking there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants