Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Console] Add markdown format to Table#59657

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:7.3fromiMi-digital:markdown-table
Feb 14, 2025

Conversation

amenk
Copy link
Contributor

@amenkamenk commentedJan 30, 2025
edited by OskarStark
Loading

QA
Branch?7.3
Bug fix?no
New feature?yes
Deprecations?no
IssuesFix#17466
LicenseMIT

Aim: allow rendering markdown tables. Those don't have a Outside border frame line like --------, so we allow to remove them and define the format "markdown".

Our motivation is to pipe symfony console output in CI to GitHub/gitlab merge requests and format them properly.

OskarStark and alexander-schranz reacted with thumbs up emoji
@carsonbot
Copy link

It looks like you unchecked the "Allow edits from maintainer" box. That is fine, but please note that if you have multiple commits, you'll need to squash your commits into one before this can be merged. Or, you can check the "Allow edits from maintainers" box and the maintainer can squash for you.

Cheers!

Carsonbot

@amenk
Copy link
ContributorAuthor

Are the failing tests related to my commit?

@@ -46,6 +46,8 @@ class TableStyle
private string $cellRowFormat = '%s';
private string $cellRowContentFormat = ' %s ';
private string $borderFormat = '%s';
private bool $intro = true;

Choose a reason for hiding this comment

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

I don't know what is a practice in Symfony to name boolean properties, but IMO it's more clear when they haveis* orhas* prefixes.

amenk reacted with thumbs up emoji
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

good point. Also I was thinking to only use one field "$hasFraming" and not allow setting intro and outro separately. Also I am not sure if "framing" is a good name.
Thoughts?

Copy link
Member

@nicolas-grekasnicolas-grekas left a comment
edited
Loading

Choose a reason for hiding this comment

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

I'm failing to get what intro/outro concepts are for. Can you please update the description of your PR to show some examples? Maybe some test cases are missing also?

edit: please add a line in the changelog of the component also

@amenk
Copy link
ContributorAuthor

@nicolas-grekas naming is probably not so good, thanks for the suggestion.

It's simply for omitting the first and the last line (------) of the table to be able to render proper markdown (see the test case)

@amenk
Copy link
ContributorAuthor

I changed the naming.

Remark: fabbot.io is suggesting this patchhttps://fabbot.io/report/symfony/symfony/59657/20ecdd1a0473ceaa5fb792b900ab41877da35a53 but I did not change those lines (and changing them would break the PHPunit tests)

@fabpot
Copy link
Member

Thank you@amenk.

@fabpotfabpot merged commit736ef64 intosymfony:7.3Feb 14, 2025
9 of 11 checks passed
@fabpotfabpot mentioned this pull requestMay 2, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@antonkomarevantonkomarevantonkomarev left review comments

@fabpotfabpotfabpot approved these changes

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

@chalasrchalasrAwaiting requested review from chalasrchalasr is a code owner

Assignees
No one assigned
Projects
None yet
Milestone
7.3
Development

Successfully merging this pull request may close these issues.

[Console] Render markdown valid using the Table class
5 participants
@amenk@carsonbot@fabpot@nicolas-grekas@antonkomarev

[8]ページ先頭

©2009-2025 Movatter.jp