Skip to content

Commit

Permalink
#15: Replace pipe symbol (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
redcatbear authored Oct 13, 2021
1 parent 345cec2 commit 0cad222
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
1 change: 1 addition & 0 deletions doc/changes/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Changelog

* [1.2.1](changes_1.2.1.md)
* [1.2.0](changes_1.2.0.md)
* [1.1.0](changes_1.1.0.md)
* [1.0.1](changes_1.0.1.md)
Expand Down
11 changes: 11 additions & 0 deletions doc/changes/changes_1.2.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# error-reporting-lua 1.2.1, released 2021-10-13

Code name: Pipe replaced

## Summary

Release 1.2.1 of `error-reporting-lua` replaces the pipe symbol "|" in the source code with `string.char(124)` to improve compatibility with environments where the pipe symbol in source produces an error.

## Refactoring

* #15: Replaced pipe symbol
4 changes: 2 additions & 2 deletions exaerror-1.2.0-1.rockspec → exaerror-1.2.1-1.rockspec
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package = "exaerror"
version = "1.2.0-1"
version = "1.2.1-1"

source = {
url = 'git://github.com/exasol/error-reporting-lua',
tag = "1.2.0"
tag = "1.2.1"
}

description = {
Expand Down
7 changes: 4 additions & 3 deletions src/message_expander.lua
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,13 @@ local function is_closing_bracket(token)
return token == "}"
end

-- We are intentionally not using the symbol itself here for compatibility reasons.
-- See https://github.com/exasol/error-reporting-lua/issues/15 for details.
local function is_pipe(token)

return token == "|"
return token == string.char(124)
end

local function is_u (token)
local function is_u(token)
return token == "u"
end

Expand Down

0 comments on commit 0cad222

Please sign in to comment.