Skip to content

Commit 8463da4

Browse files
committed
Release 0.3.1 - Bugfix for trailing newline
LexC mode 2.7.1: - Fixed trailing newline handling in output - Ensures exactly one newline at end, no more, no less Oppdateringar: - LexC mode versjon: 2.7.0 → 2.7.1 - SEE-moduspakke versjon: 0.3.0 → 0.3.1 - Dokumentasjon oppdatert i CHANGELOG.md og README.md
1 parent 7037f41 commit 8463da4

File tree

5 files changed

+32
-6
lines changed

5 files changed

+32
-6
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.3.1] - 2026-02-04
9+
10+
### Fixed
11+
- **LexC mode**: Bumped to version 2.7.1: Ensure exactly one trailing newline at end of output
12+
813
## [0.3.0] - 2026-02-04
914

1015
### Changed
@@ -30,5 +35,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3035

3136
Previous releases - see git history for details.
3237

38+
[0.3.1]: https://github.com/divvun/see-modes/compare/v0.3.0...v0.3.1
3339
[0.3.0]: https://github.com/divvun/see-modes/compare/v0.2.3...v0.3.0
3440
[0.2.3]: https://github.com/divvun/see-modes/releases/tag/v0.2.3

LexC.seemode/Contents/Info.plist

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<plist version="1.0">
44
<dict>
55
<key>NSHumanReadableCopyright</key>
6-
<string>2.7.0, ©The Divvun Group at UiT 2007-2025, http://divvun.no/</string>
6+
<string>2.7.1, ©The Divvun Group at UiT 2007-2025, http://divvun.no/</string>
77
<key>CFBundleIdentifier</key>
88
<string>SEEMode.LexC</string>
99
<key>CFBundleInfoDictionaryVersion</key>
@@ -13,9 +13,9 @@
1313
<key>CFBundlePackageType</key>
1414
<string>BNDL</string>
1515
<key>CFBundleShortVersionString</key>
16-
<string>2.7.0</string>
16+
<string>2.7.1</string>
1717
<key>CFBundleVersion</key>
18-
<string>2.7.0</string>
18+
<string>2.7.1</string>
1919
<key>SEEMinimumEngineVersion</key>
2020
<string>4.0</string>
2121
</dict>

LexC.seemode/Contents/Resources/ChangeLog.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
Changes with Version 2.7.1
2+
*) Bugfix: Ensure exactly one trailing newline at end of output
3+
14
Changes with Version 2.7.0
25
*) Improvement: Lexicalise missing now uses external Divvun-SEE-helper.app to bypass sandbox restrictions
36
*) Improvement: Words without suggestions are now preserved in the output

LexC.seemode/Contents/Resources/Scripts/lexc-lexicalise-missing.applescript

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,11 +169,25 @@ if untouched:
169169
# Clean up extra newlines - max 2 consecutive newlines
170170
result = re.sub(r\"\\n{3,}\", \"\\n\\n\", result)
171171
172-
print(result)
172+
# Ensure exactly one trailing newline
173+
if result and not result.endswith(\"\\n\"):
174+
result += \"\\n\"
175+
176+
print(result, end=\"\")
173177
'"
174178
set shellresult to combinedResult
175179
end if
176180

181+
-- Ensure exactly one trailing newline
182+
if shellresult does not end with linefeed then
183+
set shellresult to shellresult & linefeed
184+
else if shellresult ends with (linefeed & linefeed) then
185+
-- Remove extra trailing newlines
186+
repeat while shellresult ends with (linefeed & linefeed)
187+
set shellresult to text 1 thru -2 of shellresult
188+
end repeat
189+
end if
190+
177191
-- restore clipboard, and update the document with the output of the shellscript:
178192
tell application "SubEthaEdit"
179193
set the clipboard to savedClipboard

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,12 @@ They are a.o. used in the development of language resources in the [GiellaLT inf
1515

1616
**Typos** files are simple TAB separated, two column files containing real typos and their corrections. These files are used for testing spelling checkers, and the syntax colouring helps us check that the content is entered correctly.
1717

18-
# What's New in 0.3.0
18+
# What's New in 0.3.1
1919

20-
**LexC mode 2.7.0** with major improvements:
20+
**LexC mode 2.7.1** bugfix:
21+
- 🐛 Fixed trailing newline handling in output
22+
23+
**LexC mode 2.7.0** (from 0.3.0) major improvements:
2124
- 🆕 External [Divvun-SEE-helper](https://github.com/divvun/divvun-see-helper) bypasses macOS sandbox restrictions
2225
- ✨ Words without suggestions are now preserved in output
2326
- 🧹 Automatic cleanup of extra blank lines

0 commit comments

Comments
 (0)