graphile / graphile/crystal

Ruru rendering issues

Open
#2,103 2 comments 0 reactions 0 assignees View on GitHub
💅 enhancement 🙏 help-wanted
Dominant language
TypeScript
Stars
12.9k
Forks
625
Avg merge
5h 23m
Merged PRs (30d)
24

Description

### Summary

Not sure how to put this down in a good way (sorry for multi-bug). Basically, Ruru does not behave as I would expect.

[Screencast from 2024-06-21 21:07:52.webm](https://github.com/graphile/crystal/assets/2656517/cf130660-6121-4375-ae33-0e514916ed24)

Some issues:
* Sometimes (though seemingly not always!), the second paragraph of text is hidden in ruru
![Screenshot from 2024-06-21 21-32-02](https://github.com/graphile/crystal/assets/2656517/e555ad69-2140-4462-951c-6c1c815b2de0)
* SQL comment changes sometimes has no effect in ruru (see video)
* In markdown, you typically need to use two newlines to separate paragraphs. This allows you add newlines in-code to make reading the source easier, without affecting any renderings of the markdown. However, ruru seems to (somewhat randomly) add in `
`s in the html output for single line breaks which causes bad formatting. For example, the newline between "this" and "regex" at the end of this doc is unexpected:
![Screenshot from 2024-06-21 20-56-17](https://github.com/graphile/crystal/assets/2656517/365f8663-e05e-4ce0-abc0-853a67a5a55c)

### Steps to reproduce

This is the comment I was using:

```sql
comment on column labelt_public.images.data_uri is $$
@notNull

A [data URI](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URLs)
with base64 encoded data.

The URI must use an image MIME type and base64 encoded data.
A simple way to verify a given URI is to use this
regex: `^data:image/\w+;base64,[A-z0-9+/]+={0,2}$`.
$$;
```

### Expected results

The output in ruru should not be flaky and it should adhere to proper markdown (where single newlines are ignored)

### Actual results

See above

### Additional context

`postgraphile`: `5.0.0-beta.26`
`ruru`: `2.0.0-beta.13`
Google Chrome: `Version 125.0.6422.141 (Official Build) (64-bit)`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.