syntax highlighting problem with smarty php templates
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
far2l (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Noble |
Fix Released
|
Undecided
|
Unassigned | ||
Oracular |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[ Impact ]
Colorer, the syntax highlighter used by FAR2L, incorrectly interprets Smarty template syntax. This leads to valid Smarty templates being displayed with syntax errors, hindering readability and development. This fix improves syntax highlighting accuracy for Smarty templates within far2l.
[ Test Plan ]
1. Install FAR2L with the updated Colorer schemes (from the PPA or after applying the patch).
2. Create file test.smarty in editor with the following content:
<script>
$(document)
// ...
return false;
});
});
</script>
<style>
.appeal-content {
padding: 10px;
}
table.
color: white;
cursor: pointer;
}
</style>
3. Compare the highlighting with attached reference image
Also compare the highlighting with the previous version where this snippet would show syntax errors.
[ Where problems could occur ]
The changes modify how Smarty templates are parsed. While targeted, regressions are possible, especially with more complex or edge-case Smarty syntax. Testing several complex Smarty templates is recommended to ensure no unintended highlighting issues are introduced. Also the fix is already in 24.10 and in project's ppa, no problems were reported.
[ Other Info ]
This fix addresses the issues raised in the upstream Colorer project (see links above) and has been integrated into far2l via a pull request. It significantly improves Smarty template support within far2l without requiring broad changes to the highlighting engine. This enhances the editor's usability for web developers working with Smarty templates. This change is already in 24.10 and here is a patch adopting it for 24.04.
https:/
https:/
https:/
ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: far2l 2.6.0~beta+
ProcVersionSign
Uname: Linux 6.8.0-31-generic x86_64
ApportVersion: 2.28.1-0ubuntu2
Architecture: amd64
CasperMD5CheckM
CasperMD5CheckR
CurrentDesktop: ubuntu:GNOME
Date: Wed Oct 9 15:37:28 2024
InstallationDate: Installed on 2024-04-29 (163 days ago)
InstallationMedia: Ubuntu 24.04 LTS "Noble Numbat" - Release amd64 (20240424)
ProcEnviron:
LANG=en_US.UTF-8
PATH=(custom, no user)
SHELL=/bin/bash
TERM=xterm-
XDG_RUNTIME_
SourcePackage: far2l
UpgradeStatus: No upgrade log present (probably fresh install)
fix backported to 24.04