(found in 4.3pre17)
Bourne shell "here documents" (<<DELIM ... DELIM) work fine out of the box with jEdit's
syntax handling, but the indented version (<<-DELIM ... DELIM) is not recognized for
what it is. A simple change to shellscript.xml solves the problem.
<\!-- Readins -->
<SPAN_REGEXP HASH_CHAR="<<" TYPE="LITERAL1" DELEGATE="LITERAL">
<BEGIN><\!\[CDATA\[<<-?\[\p{Space}'"\]\*(\[\p{Alnum}_\]+)\[\p{Space}'"\]\*\]\]></BEGIN>
<END AT_LINE_START="TRUE">$1</END>
</SPAN_REGEXP>
The change is altering "<<" in the CDATA to "<<-?".
Submitted | nobody - 2009-09-09 15:05:25 | Assigned | |
---|---|---|---|
Priority | 3 | Labels | |
Status | pending | Group | None |
Resolution | remind |
2009-09-09 15:07:32 *anonymous |
- **priority**: 5 --> 3 |
---|---|
2009-09-10 05:31:07 *anonymous |
Another slight error in the above, but I'm not enough of a syntax highlighter expert to figure it out, is that <END AT_LINE_START="TRUE"> is wrong, at least for bash. What \*IS\* required is that the closing word be the first non-whitespace on the line, and that nothing (including whitespace) follows it. Just setting AT_LINE_START="FALSE" is a quick hack that works kinda-sorta, but that does some bad stuff if you happen to use the closing word somewhere in your text. A better way to do it would be some kind of pattern that says "<line beginning><optional whitespace>$1" but I can't figure out any way to make that work. |
2012-02-24 19:39:41 ezust |
- **labels**: 102669 --> |
2012-02-24 19:39:41 ezust |
Moving to patches tracker. |
2012-08-22 17:52:55 ezust |
This is not actually a patch yet. Would you mind making your changes to the current
svn trunk of shellscript.xml and generating a patch with "svn patch", attaching it
as an attachment to this ticket please?
|
2012-08-22 17:52:55 ezust |
- **status**: open --> open-remind |
2012-08-22 17:54:14 ezust |
Also, please attach a sample shellscript file with a here document for testing purposes.
|
2012-08-22 17:54:47 ezust |
- **status**: open-remind --> pending-remind |