summaryrefslogtreecommitdiffstats
path: root/modules/perlconverters
diff options
context:
space:
mode:
authorPeter von Kaehne <refdoc@gmx.net>2011-06-14 21:47:03 +0000
committerPeter von Kaehne <refdoc@gmx.net>2011-06-14 21:47:03 +0000
commit8bb03832bf1863da8ebcff409c21d6f4fde089e1 (patch)
tree3424b8694e8e70b1bdf1fe2951853f4fff19a442 /modules/perlconverters
parentd5c3981501642ed09d357fa5109c54b1f9c9c2e8 (diff)
downloadsword-tools-8bb03832bf1863da8ebcff409c21d6f4fde089e1.tar.gz
corrected use of \d
git-svn-id: https://www.crosswire.org/svn/sword-tools/trunk@327 07627401-56e2-0310-80f4-f8cd0041bdcd
Diffstat (limited to 'modules/perlconverters')
-rw-r--r--modules/perlconverters/usfm2osis.pl11
1 files changed, 8 insertions, 3 deletions
diff --git a/modules/perlconverters/usfm2osis.pl b/modules/perlconverters/usfm2osis.pl
index fa02657..244a24b 100644
--- a/modules/perlconverters/usfm2osis.pl
+++ b/modules/perlconverters/usfm2osis.pl
@@ -424,13 +424,18 @@ foreach $file (@files) {
### Titles, Headings, and Labels (elsewhere?)--Markers Supported: \d, \ms#, \s#, \mt#, \r, \sp
#### Markers Not Yet Supported: \mte#, \mr, \sr, \rq...\rq*
- # \d \ms majorSection
- if ($line =~ /^\\(ms|d)\b\s*(.+)/) {
+ # \ms majorSection
+ if ($line =~ /^\\ms\b\s*(.+)/) {
push (@outdata, closeTag("<\/p>"));
push (@outdata, closeTag("<\/div type=\"majorSection\">"));
push (@outdata, "<div type=\"majorSection\">\n");
openTag("<\/div type=\"majorSection\">");
- $line =~ s/\\(ms|d)\b\s*(.+)/<title>$2<\/title>/;
+ $line =~ s/\\ms\b\s*(.+)/<title>$1<\/title>/;
+ }
+ # \d canonical title
+ if ($line =~ /^\\(ms|d)\b\s*(.+)/) {
+ push (@outdata, closeTag("<\/p>"));
+ $line =~ s/\\d\b\s*(.+)/<title type=\"canonical\">$1<\/title>/;
}
# \s \s1 section (From Chapters and Verses)