summaryrefslogtreecommitdiff
path: root/syntax.pl
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2000-10-17 23:45:00 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2000-10-17 23:45:00 +0000
commite23760fb259501bcd1f42cdb7088c5edbea84688 (patch)
tree0b7b32a2c6b8733e4e2998013f04adc22fe95e72 /syntax.pl
parent0977ab90e5feb02ad53eb660b693adda83c666fc (diff)
downloadirssi-e23760fb259501bcd1f42cdb7088c5edbea84688.zip
Fixed to work with multiline syntaxes (by lite)
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@766 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'syntax.pl')
-rwxr-xr-xsyntax.pl7
1 files changed, 4 insertions, 3 deletions
diff --git a/syntax.pl b/syntax.pl
index 5bcb8a3a..7760457b 100755
--- a/syntax.pl
+++ b/syntax.pl
@@ -10,8 +10,8 @@
# Remember to include the asterisk ('*').
$SRC_PATH='src';
-# This is quick and dirty, but works for sure :)
-$FOO = `find src -name '*.c' -exec grep -e '/* SYNTAX:' \{\} \\; | sed 's/.*SYNTAX: //' > irssi_syntax`;
+$FOO = `find src -name '*.c' -exec ./findsyntax.pl \{\} \\; | sed 's/.*SYNTAX: //' > irssi_syntax`;
+
while (<docs/help/in/*.in>) {
open (FILE, "$_");
@@ -21,7 +21,8 @@ while (<docs/help/in/*.in>) {
if ($DATARIVI =~ /\@SYNTAX\:(.+)\@/) {
$etsittava = "\U$1 ";
$SYNTAX = `grep \'^$etsittava\' irssi_syntax`;
- $SYNTAX =~ s/\*\///g; $SYNTAX =~ s/ *$//;
+ $SYNTAX =~ s/\*\///g;
+ $SYNTAX =~ s/ *$//; $SYNTAX =~ s/ *\n/\n/g;
$DATARIVI = $SYNTAX;
}
}