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

document generator has some bugs #21222

Closed
despiegk opened this issue Apr 8, 2024 · 7 comments · Fixed by #21230 or #21248
Closed

document generator has some bugs #21222

despiegk opened this issue Apr 8, 2024 · 7 comments · Fixed by #21230 or #21248
Assignees
Labels
Bug This tag is applied to issues which reports bugs.

Comments

@despiegk
Copy link
Contributor

despiegk commented Apr 8, 2024

Describe the bug

weird code in docu

e.g. in https://modules.vlang.io/context.html
image
note how everything is left intended & & is prob not right too

duplicates & no search

see https://freeflowuniverse.github.io/crystallib/

image

there are duplicate entries

also no search on this one

to generate these you can use instructions on https://github.com/freeflowuniverse/crystallib?tab=readme-ov-file#generating-docs

Reproduction Steps

see above

Expected Behavior

  • search works
  • no duplicates
  • cleaner code view

Current Behavior

see above

Possible Solution

No response

Additional Information/Context

No response

V version

Current V version: V 0.4.5 3835308

Environment details (OS name and version, etc.)

m1 osx

Note

You can use the 👍 reaction to increase the issue's priority for developers.

Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.

@despiegk despiegk added the Bug This tag is applied to issues which reports bugs. label Apr 8, 2024
@JalonSolov
Copy link
Contributor

This was just fixed in #21220

@spytheman
Copy link
Member

The indentation is fixed in #21220, but & and > are still not properly shown as & and > in the code blocks.

@spytheman spytheman reopened this Apr 8, 2024
@ttytm ttytm self-assigned this Apr 8, 2024
@ttytm
Copy link
Member

ttytm commented Apr 8, 2024

Yes, there is a issue with multiline examples. Not just in the readme.

// Example: my_ch <- true // is okay
pub fn foo() {

// Example: 
// ```v
// my_ch <- true // `<` will be rendered as `&lt;`
// ```
pub fn foo() {

@medvednikov
Copy link
Member

medvednikov commented Apr 9, 2024

There still seems to be an issue with search when running locally:

funny if I go in & out of a folder at left, I get some search to work, but at start not

hmmm most of cases I can't get it to work

might have something to do with readme exists

when I click on e.g. bizmodel left, then search works

Can you have a look at it please @ttytm ?

Thanks

@4zv4l
Copy link
Contributor

4zv4l commented Apr 10, 2024

https://modules.vlang.io/toml.html

In the TOML stdlib doc, first code block, there are some issue with the generation as well:
image

@ttytm
Copy link
Member

ttytm commented Apr 10, 2024

I'll look into it.

modules.vlang.io/toml.html

In the TOML stdlib doc, first code block, there are some issue with the generation as well: image

This one is still there since it has the language specified with v ignore. Currently the unescape became part of the v / vlang only code block. It could be solve by not escaping all ``` md_block_codes's. But I also realised that this is not the correct solution for everything. It can break some readme html outputs. The escaping needs to be made more selectively. Need to investigate

@ttytm
Copy link
Member

ttytm commented Apr 11, 2024

The search issue on an index.html page when generating docs with -readme is still present. This is how it always was - at least from the first time I have generated such a readme page I noticed that. On module pages there are no issues - readme included or not.

I'd have to look into it to tell about the amount of work this will require to fix. If it's not fitting now, maybe just making clear via it's attributes and style that the search is disabled on such readme html pages would do for now. What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This tag is applied to issues which reports bugs.
Projects
None yet
6 participants