Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,23 @@ Then build and run tests with `yarn test`.

Make sure to read about [React][reason-react] and [Reason][rescript-lang] too.

To make a release:

- Update the version number in packages.json
- Run `npm run build && npm run bundle`
- Then: `npm publish`
- Tag and push the commit

## Changes

### 0.7.4

- Add the missing `Ansi.res.js` to the release.

### 0.7.3

- Better parse url.

### 0.7.2

- Use a bundle for the published JS library thanks to
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@softwarefactory-project/re-ansi",
"version": "0.7.2",
"version": "0.7.4",
"description": "ANSI code to HTML",
"files": [
"README.md",
Expand Down
2 changes: 1 addition & 1 deletion src/Ansi.res
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ module AnsiCode = {

// Link management
module HttpLink = {
let linkRe = RegExp.fromString("^(http(s)?:\\/\\/[^\\s]+)");
let linkRe = RegExp.fromString("^(http(s)?:\\/\\/[^\\)>\\s]+)");

let get = (txt: string): parser<code> =>
linkRe
Expand Down
12 changes: 12 additions & 0 deletions tests/Spec.res
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,18 @@ let spec = [
Link("http://example.com/test"),
Text(" 200"),
]),
"get2: [Example text](<https://example.com>)"
->testParse([
Text("get2: [Example text](<"),
Link("https://example.com"),
Text(">)"),
]),
"get3: [Example text](https://example.com)"
->testParse([
Text("get3: [Example text]("),
Link("https://example.com"),
Text(")"),
]),
"bright: \x1b[90mtest\x1b[m"
->testParse([Text("bright: "), withBrightColor("grey", [Text("test")])]),
];
Expand Down