Thanks to visit codestin.com
Credit goes to github.com

Skip to content

markdown document preview improvements#9240

Open
haidubogdan wants to merge 1 commit intoapache:masterfrom
haidubogdan:t_markdown_improvements
Open

markdown document preview improvements#9240
haidubogdan wants to merge 1 commit intoapache:masterfrom
haidubogdan:t_markdown_improvements

Conversation

@haidubogdan
Copy link
Contributor

This PR proposes some hard coded styling improvements for markdown preview renderer.
Swing html renderer has a lot of Css limitations, so future improvements could look at using other html java renderers

Before:

image

After:

image

Closes #6652

  • hardcoded swing html renderer compatible css styling
  • custom <hr> tag renderer
  • strikethrough flexmark extension preparation
  • update vscode regex for striketrhough detection

Know limitations

  • strikethrough element parser requires binary extension from flexmark
  • <code> don't apply padding

^Add meaningful description above

Click to collapse/expand PR instructions

By opening a pull request you confirm that, unless explicitly stated otherwise, the changes -

  • are all your own work, and you have the right to contribute them.
  • are contributed solely under the terms and conditions of the Apache License 2.0 (see section 5 of the license for more information).

Please make sure (eg. git log) that all commits have a valid name and email address for you in the Author field.

If you're a first time contributor, see the Contributing guidelines for more information.

If you're a committer, please label the PR before pressing "Create pull request" so that the right test jobs can run.

PR approval and merge checklist:

  1. Was this PR correctly labeled, did the right tests run? When did they run?
  2. Is this PR squashed?
  3. Are author name / email address correct? Are co-authors correctly listed? Do the commit messages need updates?
  4. Does the PR title and description still fit after the Nth iteration? Is the description sufficient to appear in the release notes?

If this PR targets the delivery branch: don't merge. (full wiki article)

@mbien mbien added this to the NB30 milestone Mar 2, 2026
@mbien mbien added the ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) label Mar 2, 2026
release.external/flexmark-ext-tables-0.64.8.jar=modules/ext/flexmark-ext-tables-0.64.8.jar
release.external/flexmark-ext-gfm-tasklist-0.64.8.jar=modules/ext/flexmark-ext-gfm-tasklist-0.64.8.jar
#waiting for binaries update
#release.external/flexmark-ext-gfm-strikethrough-0.64.8.jar=modules/ext/flexmark-ext-gfm-strikethrough-0.64.8.jar
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right. The way to get that would be to add it to the binaries-list file using a dummy hash, build it and then paste the correct hash from the build failure msg.

Updates are similar. You would bump the version and then fix the hashes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I will do a test to see if the process works.

@mbien
Copy link
Member

mbien commented Mar 2, 2026

only took a quick look at the output of some readme files and I think it looks better. Will need some tweaks for the dark theme since the background renders as white atm etc.

Closes apache#6652

- hardcoded swing html renderer compatible css styling
- custom <hr> tag renderer
- strikethrough extension
- uniform mime_type
- update vscode regex for striketrhough detection
@haidubogdan haidubogdan force-pushed the t_markdown_improvements branch from af46460 to 1982844 Compare March 2, 2026 20:50
@Chris2011
Copy link
Contributor

We already talked about "customization" and it is fine to make it hard coded, but can't we do it direclty inside a css file. it is still hard coded but I can change this, if i want in the settings. So my idea is to add the css to the css file and read it from there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) Editor Markdown

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Markdown files are not rendered correctly

3 participants