From 251423d8fc6509169da85373b4399b12cedc40e7 Mon Sep 17 00:00:00 2001 From: Tan Le Date: Tue, 12 Nov 2024 13:18:35 +1000 Subject: [PATCH] Update various doc (#2086) * Fix typo and trim spaces * Use bash syntax for all shell scripts * Update CI badge link --- LICENSE | 3 ++- README.md | 8 ++++---- docs/DevEnvironment.md | 10 +++++----- docs/LexerDevelopment.md | 2 +- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/LICENSE b/LICENSE index 660592c179..9dabadc1ed 100644 --- a/LICENSE +++ b/LICENSE @@ -21,8 +21,9 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # SPECIAL NOTE: + Many of the lexers in this project are adaptations of those in Pygments -(pygments.org). The license for Pygments is as follows: +(pygments.org). The license for Pygments is as follows: # BEGIN pygments/LICENSE # diff --git a/README.md b/README.md index 64816f50b1..867c1400e7 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Rouge -![Build Status](https://github.com/rouge-ruby/rouge/actions/workflows/ruby.yml/badge.svg) +[![Build Status](https://github.com/rouge-ruby/rouge/actions/workflows/ruby.yml/badge.svg)](https://github.com/rouge-ruby/rouge/actions/workflows/ruby.yml) [![Gem Version](https://badge.fury.io/rb/rouge.svg)](https://rubygems.org/gems/rouge) [![YARD Docs](http://img.shields.io/badge/yard-docs-blue.svg)](https://rouge-ruby.github.io/docs/) @@ -23,7 +23,7 @@ gem 'rouge' or -```sh +```bash gem install rouge ``` @@ -67,7 +67,7 @@ use and whether to enable line numbers or not. More information is available in Rouge ships with a `rougify` command which allows you to easily highlight files in your terminal: -```sh +```bash rougify foo.rb rougify style monokai.sublime > syntax.css ``` @@ -278,7 +278,7 @@ test file by setting the `TEST` environment variable to the path of the desired test. For example, to test just the _`ruby` lexer_ (located at path `spec/lexers/ruby_spec.rb`) simply run the following: -```sh +```bash TEST=spec/lexers/ruby_spec.rb rake ``` diff --git a/docs/DevEnvironment.md b/docs/DevEnvironment.md index d675b27a03..66b36df151 100644 --- a/docs/DevEnvironment.md +++ b/docs/DevEnvironment.md @@ -70,7 +70,7 @@ fork. Select your account and—boom!—you've just forked Rouge. The next thing to do is to get your fork onto your computer. Git makes this easy. In the directory you want to hold your repository, type: -```shell +```bash git clone git@github.com:/rouge.git ``` @@ -87,7 +87,7 @@ of time developing Rouge, this is something you'll want to do. Fortunately, it's easy to add additional remote repositories. To add the official Rouge repository (with the name `upstream`), type the following: -```shell +```bash git remote add upstream https://github.com/rouge-ruby/rouge.git ``` @@ -116,7 +116,7 @@ If you already develop with Ruby, you no doubt have Bundler installed. You can check if you do by typing `bundle -v` at the command line. If you don't see the version number then you need to install Bundler. To do this, type: -```shell +```bash gem install bundler ``` @@ -128,7 +128,7 @@ that's complete, you're ready to rock. Rouge comes with a list of gems it depends upon called a _Gemfile_. Make sure you're at the top level of your clone of your repository and type: -```shell +```bash bundle config set path 'vendor' bundle install ``` @@ -149,7 +149,7 @@ type `bundle exec rake` rather than just `rake`. It's best to develop in a _branch_. You can create a branch by typing: -```shell +```bash git checkout -b ``` diff --git a/docs/LexerDevelopment.md b/docs/LexerDevelopment.md index 9057f4cd5a..11d5e8611a 100644 --- a/docs/LexerDevelopment.md +++ b/docs/LexerDevelopment.md @@ -473,7 +473,7 @@ that there is no file extension. ### Visual Samples -A visual sample is a file that includes a representive sample of the syntax of +A visual sample is a file that includes a representative sample of the syntax of your language. The sample should be long enough to reasonably demonstrate the correct lexing of the language but does not need to offer complete coverage. While it can be tempting to copy and paste code found online, please refrain