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

[feature] add markdown formatter #2519

Merged
merged 7 commits into from
Aug 13, 2024

Conversation

zhangshenghang
Copy link
Member

What's changed?

#2518

Support Markdown file formatting

Formatting can be done via spotless apply
image

At the same time, if it does not meet the specifications during compilation, it will be detected

effect:
image

Checklist

@tomsun28 Implemented through the following configuration,

<plugin>
                <groupId>com.diffplug.spotless</groupId>
                <artifactId>spotless-maven-plugin</artifactId>
                <version>2.40.0</version>
                <configuration>
                    <skip>false</skip>
                    <markdown>
                        <includes>
                            <include>home/docs/**/*.md</include>
                        </includes>
                        <flexmark />
                        <replaceRegex>
                            <name>Markdown Formatter</name>
                            <searchRegex>(^-*\n$)([\s\S]*?)(-+$)</searchRegex>
                            <replacement>---$2---</replacement>
                        </replaceRegex>
                    </markdown>
                    <upToDateChecking>
                        <enabled>true</enabled>
                    </upToDateChecking>
                </configuration>
                <executions>
                    <execution>
                        <id>spotless-check</id>
                        <goals>
                            <goal>check</goal>
                        </goals>
                        <phase>validate</phase>
                    </execution>
                </executions>
            </plugin>

@github-actions github-actions bot added the doc Improvements or additions to documentation label Aug 13, 2024
@zhangshenghang zhangshenghang changed the title [feature] add makrdown formatter [feature] add markdown formatter Aug 13, 2024
Copy link
Contributor

@tomsun28 tomsun28 left a comment

Choose a reason for hiding this comment

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

lgtm!

@tomsun28 tomsun28 merged commit fbb7419 into apache:master Aug 13, 2024
3 checks passed
@zhangshenghang zhangshenghang deleted the feature-add-makrdown-formatter branch September 3, 2024 23:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants