Skip to content

This program checks your markdown files for any errors so your MD files are more polished. Built with Ruby.

License

Notifications You must be signed in to change notification settings

StarSheriff2/MD-Cleaner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Md Cleaner

This is a linter program that checks for errors in markdown files specifically used in Github repositories.

screenshot

In this project, I built a linter for markdown files. I made this tool with README.md files in mind that typically go inside Github repositories. It currently detects three types of errors:

  • Heading errors
  • Paragraph indent errors
  • Italics in the middle of a word

After you run the program, it will return a list with all errors in your MD file, with the following information:

  • Code line
  • Character position
  • Copy of code where an error was detected
  • A brief description of the error and correction steps to fix it

Once you fix an error, the program won't show this error again if you run the program. Fix all issues until there are no more error messages. If you do, a message will appear stating there are no more errors.

Built With

  • Ruby
  • RSpec, Rubocop
  • VSCode, Github, Gitflow

Live Demo

Getting Started

To get a local copy up and running follow these simple example steps.

Setup

  1. Open your terminal or command prompt.
  2. If you don't have git installed in your system, skip this step and go to step 3. If you do have git installed in your system, clone this repository to your computer in any directory you want by copying this text into your command prompt/terminal: git@github.com:StarSheriff2/MD-Cleaner.git. Now go to step 6.
  3. If you don't have git installed in your system, you can download the program files. To do this, click on the green button that says "Code", on the upper right side of the project frame.
  4. You will see a dropdown menu. Click on "Download ZIP".
  5. Go to the directory where you downloaded the ZIP file and open it. Extract its contents to any directory you want in your system.
  6. If you are not in your system terminal/command prompt already, please open it and go to the directory where you cloned the remote repository or extracted the project files.
  7. While in the root directory, type bundle install. This will install Rspec in your system, in case you don't have it installed already. (It also installs Rubocop; however, this gem is not necessary to make the program work).

Usage

  1. To run the program, go to the projects's root directory and type bin/md_linter.rb
  2. If this doesn`t work, type ruby ./bin/md_linter.rb
  3. By default the program checks for errors in 'lib/test.md'
  4. If you want to check your own file do this:
  • copy your markdown file into the lib directory
  • open the 'md_linter.rb' file located in the 'bin' directory of the project
  • substitute file = 'lib/test.md with your own filename, like so file = 'lib/#filename.md'
  1. Run the program and it should return any errors it finds in your file

Run tests

To run the Rspec tests do the following:

  • Open your terminal and go to the project's root directory
  • Type this rspec --format doc to see test example results

Authors

👤 Arturo Alvarez

Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

Show your support

Give a ⭐️ if you like this project!

Acknowledgments

📝 License

This project is MIT licensed.

About

This program checks your markdown files for any errors so your MD files are more polished. Built with Ruby.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages