From 4270a3f0879bfcab5a0fad4390a3796094e3ab92 Mon Sep 17 00:00:00 2001 From: linrongbin16 Date: Mon, 8 Jan 2024 20:59:42 +0800 Subject: [PATCH 1/2] chore(docs): wording --- README.md | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 2b985c6..7f1c07e 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,10 @@ Pure Lua implemented git URL parsing library, e.g. the output of git remot - [Requirements](#requirements) - [Features](#features) - [Install](#install) +- [Patterns](#patterns) + - [Full Pattern](#full-pattern) + - [Protocol Omitted Pattern](#protocol-omitted-pattern) + - [Local Pattern](#local-pattern) - [API](#api) - [Types](#types) - [`giturlparser.GitUrlPos`](#giturlparsergiturlpos) @@ -37,9 +41,19 @@ Single file & zero dependency. Full [Git Protocols](https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols) support (see below). +## Install + +```bash +luarocks install giturlparser +``` + +## Patterns + +Below url patterns been supported: + > [!NOTE] > -> Below pattern are (just easier to help explain the parsing algorithm) written in a regex-like syntax: +> These patterns are (just easier to help explain the parsing algorithm) written with a regex-like syntax: > > 1. The `{}` contains parsed components returned from [`giturlparser.GitUrlInfo`](#giturlparsergiturlinfo). > 2. The `[]` contains optional (0 or 1) component. @@ -82,10 +96,6 @@ For example: - `~/home/to/the/repo.git` - `/usr/home/to/the/repo.git` -## Install - -`luarocks install giturlparser` - ## API ### Types From bfe5270c806111619bad6ceddd8baee0c6fcb536 Mon Sep 17 00:00:00 2001 From: linrongbin16 Date: Mon, 8 Jan 2024 21:00:41 +0800 Subject: [PATCH 2/2] Update README.md --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7f1c07e..0fca423 100644 --- a/README.md +++ b/README.md @@ -37,9 +37,8 @@ Pure Lua implemented git URL parsing library, e.g. the output of git remot ## Features -Single file & zero dependency. - -Full [Git Protocols](https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols) support (see below). +* Single file & zero dependency. +* Full [Git Protocols](https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols) support (see [Patterns](#patterns)). ## Install