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

Markdown backend: complete implementation #35

Merged
merged 46 commits into from Jan 28, 2024
Merged

Conversation

lukstafi
Copy link
Contributor

Currently, multiline preformatted content as separate inline code markers. Will consider using code blocks...

I'll also test links, complex combinations and big output sizes.

…lly foldable trees

Currently, multiline preformatted content as separate inline code markers. Will consider using code blocks...
@lukstafi lukstafi marked this pull request as draft January 20, 2024 22:30
@lukstafi
Copy link
Contributor Author

First experiments with ppx_minidebug look very promising, no issues! Sill need to:

  • see if code blocks would look nicer than separate lines of inline code
  • verify table export works (as text and as html)
  • verify a large-scale ppx_minidebug use case

@lukstafi lukstafi marked this pull request as ready for review January 22, 2024 13:28
@lukstafi
Copy link
Contributor Author

Let me know if you'd like to have printbox-md try approximately exporting special cases of tables in a more Markdown-friendly format. Meaning:

  • using Markdown tables in the rare cases where they fit (bold-style or framed header and single line rows)
  • using lists for single-column tables (vlist)
  • using... the nbsp converter for single-row tables (hlist).

So, I noticed I get a lot of fluff because I've used vlist x in one place, and I can easily use tree empty x instead -- but maybe we can do that inside printbox-md itself.

@lukstafi lukstafi changed the title Markdown backend: complete initial impl. Verified: frames and optionally foldable trees Markdown backend: complete implementation Jan 22, 2024
@lukstafi
Copy link
Contributor Author

I checked that GitHub's Markdown rendering is capped at below 2MB. VSCode Markdown rendering works with bigger files, but there's an annoying waiting period (in that there's no reaction, a progress indicator would make it more bearable) that's even longer than with GitHub.

@lukstafi
Copy link
Contributor Author

  • using lists for single-column tables (vlist)

I'll implement this simple case, since tree empty x causes an extra fold.

@lukstafi lukstafi marked this pull request as draft January 23, 2024 17:39
@lukstafi lukstafi marked this pull request as ready for review January 23, 2024 22:54
@lukstafi lukstafi marked this pull request as draft January 24, 2024 08:28
 Complement of `multiline_heuristic` is the domain of `line_of_length`.
optimally escape all Markdown constructs (i.e. only when needed),
minimize the use of ` ` --
but a slight temporary regression, needs `white-space: pre`.
@lukstafi
Copy link
Contributor Author

lukstafi commented Jan 26, 2024

The biggest bummer is that GitHub Markdown rendering, as far as I see, just entirely rejects using styles provided by <div style=...> or <span style=...> elements. This is not expected! (Other renderers, and CommonMark, render styles as normal HTML.) Let's do this: I keep a personal branch with the full scope so I feel less bad about it, and remove the Stylized functionality from the PR.

@lukstafi lukstafi marked this pull request as ready for review January 26, 2024 20:36
@c-cube c-cube merged commit 7a4baa3 into c-cube:main Jan 28, 2024
3 checks passed
@lukstafi lukstafi deleted the markdown branch January 28, 2024 09:45
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

Successfully merging this pull request may close these issues.

None yet

2 participants