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

Give an easy syntax to center-align #1657

Merged
merged 8 commits into from
Aug 27, 2021

Conversation

riyadh-h
Copy link
Contributor

@riyadh-h riyadh-h commented Aug 22, 2021

What is the purpose of this pull request?

  • Documentation update
  • Bug fix
  • Feature addition or enhancement
  • Code maintenance
  • Others, please explain:

Resolves #900

Overview of changes:
MarkBind can now process text to be center-aligned using the syntax of markdown-it-center-text.

Anything you'd like to highlight / discuss:

  • This enhancement makes use of the original source code for the plugin mentioned above, customized to use Bootstrap's text-center class instead.
  • Tests were added and updated accordingly.

Testing instructions:
n/a

Proposed commit message: (wrap lines at 72 characters)

Give an easy syntax to center-align

Text content is centered by wrapping an HTML element around said text
(if it is not contained within one already) and applying some class
(e.g., `text-center`) to it.

Users who frequently use center-aligned text frequently on their 
website(s) would find it tiresome to do so.

Let's add a simple syntax rule to easily mark text to be center-aligned.

Using a syntax rule requires less typing to be done by the users than
using a component markup, for example.

Checklist: ☑️

  • Updated the documentation for feature additions and enhancements
  • Added tests for bug fixes or features
  • Linked all related issues
  • No unrelated changes

@riyadh-h riyadh-h marked this pull request as ready for review August 22, 2021 05:43
Copy link
Contributor

@jonahtanjz jonahtanjz left a comment

Choose a reason for hiding this comment

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

Thanks for working on this @riyadh-h :)

Generally looks good. You might want to update the user guide (maybe under this section) to include the new feature.

One thing to note: you can ignore the changes of the .png files after running npm run updatetest. It is an open issue #1130.

@riyadh-h
Copy link
Contributor Author

@jonahtanjz my pleasure, and thanks for the feedback! 😄
I'll try to update the user guide and exclude the image files as soon as I can 👍

Copy link
Contributor

@jonahtanjz jonahtanjz left a comment

Choose a reason for hiding this comment

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

Thanks @riyadh-h :)

LGTM 👍

@jonahtanjz jonahtanjz added this to the 3.0.7 milestone Aug 26, 2021
@jonahtanjz jonahtanjz merged commit eae4782 into MarkBind:master Aug 27, 2021
ong6 added a commit to ong6/markbind that referenced this pull request Oct 9, 2021
ong6 added a commit to ong6/markbind that referenced this pull request Oct 9, 2021
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.

Give an easy syntax to center-align
2 participants