2 # ====================[ orgaddition.pl ]====================
6 orgaddition - An Oddmuse module for augmenting the Org Markup module with
7 so-called, unofficial "Org Additions" markup.
11 orgaddition is simply installable; simply:
15 =item First install the Org Markup module; see
16 L<http://oddmuse.org/wiki/Org_Markup_Extension>.
18 =item Move this file into the B<wiki/modules/> directory for your Oddmuse Wiki.
25 $ModulesDescription .= '<p>See <a href="http://oddmuse.org/wiki/Org_Markup_Extension">Org Markup Extension</a></p>';
27 # ....................{ CONFIGURATION }....................
31 orgaddition is easily configurable; set these variables in the
32 B<wiki/config.pl> file for your Oddmuse Wiki.
35 # Since these rules are not official now, users can turn off some of
37 use vars
qw($OrgAdditionSupSub
39 $OrgAdditionInlineQuote
42 =head2 $OrgAdditionSupSub
44 A boolean that, if true, enables this extension's handling of
45 ^^supscript^^ and ,,subscript,,-style markup. (By default, this boolean is
49 $OrgAdditionSupSub = 0;
51 =head2 $OrgAdditionDefList
53 A boolean that, if true, enables this extension's handling of
54 "; definition : lists"-style markup. (By default, this boolean is true.)
57 $OrgAdditionDefList = 0;
59 =head2 $OrgAdditionInlineQuote
61 A boolean that, if true, enables this extension's handling of ''inline
62 quote''-style markup. (By default, this boolean is false.)
65 $OrgAdditionInlineQuote = 0;
67 # ....................{ MARKUP }....................
68 push(@MyRules, \
&OrgAdditionRule
);
69 SetHtmlEnvironmentContainer
('blockquote');
71 # Blockquote line-breaks conflict with Org-style line-breaks.
72 $RuleOrder{\
&OrgAdditionRule
} = -11;
78 if ($OrgAdditionDefList && $bol && m/\G\s*\;[ \t]*(?=(.+(\n)(\s)*\:))/cg
79 or InElement
('dd') && m/\G\s*\n(\s)*\;[ \t]*(?=(.+\n(\s)*\:))/cg) {
80 return CloseHtmlEnvironmentUntil
('dd') . OpenHtmlEnvironment
('dl', 1)
81 . AddHtmlEnvironment
('dt');
82 } # `:' needs special treatment, later
83 elsif (InElement
('dt') and m/\G\s*\n(\s)*\:[ \t]*(?=(.+(\n)(\s)*\:)*)/cg) {
84 return CloseHtmlEnvironment
() . AddHtmlEnvironment
('dd');
85 } elsif (InElement
('dd') and m/\G\s*\n(\s)*\:[ \t]*(?=(.+(\n)(\s)*\:)*)/cg) {
86 return CloseHtmlEnvironment
() . AddHtmlEnvironment
('dd');
89 elsif ($OrgAdditionInlineQuote and m/\G\'\'/cgs) {
90 return AddOrCloseHtmlEnvironment
('q');
96 =head1 COPYRIGHT AND LICENSE
98 The information below applies to everything in this distribution,
101 Copyleft 2008 by B.w.Curry <http://www.raiazome.com>.
102 Copyright 2008 by Weakish Jiang <weakish@gmail.com>.
103 Copyright 2009 Alex Schroeder <alex@gnu.com>
104 Copyright 2013 Jambunathan K <kjambunathan@gmail.com>
106 This program is free software; you can redistribute it and/or modify
107 it under the terms of the GNU General Public License as published by
108 the Free Software Foundation; either version 3 of the License, or
109 (at your option) any later version.
111 This program is distributed in the hope that it will be useful,
112 but WITHOUT ANY WARRANTY; without even the implied warranty of
113 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
114 GNU General Public License for more details.
116 You should have received a copy of the GNU General Public License
117 along with this program. If not, see L<http://www.gnu.org/licenses/>.