Commit Graph

3937 Commits

Author SHA1 Message Date
Alex Schroeder
50e96cad8f * modules/poetry.pl ($PoetryIsHandlingXMLStyleMarkup): New option.
($PoetryIsHandlingCreoleStyleMarkup): New option.
(PoetryRule): Utilized new options, so as to permit several markup
styles, and simplified implementation, according to recent
refactoring in "wiki.pl".
(CloseHtmlEnvironmentsPoetry): New function, permitting block-level
elements (e.g., lists, tables) within poems.
2008-11-11 04:50:46 +00:00
Alex Schroeder
6a9f180e54 * modules/creole.pl (CreoleRule): Corrected a horrific link-caching
issue with my last commit. Apologies to those who've already
installed the last commit: this one should be (substantially!) more
stable.
2008-11-10 15:53:22 +00:00
Alex Schroeder
d859112b3a * modules/creole.pl (CreoleRule): Simplified implementation and
integrated with improvements to CreoleHeaderRule().
(CreoleHeaderRule): Improved -- remarkably. Header markup may now
include all other (non-bol) markup, with exception of link markup
producing a dirty HTML block. ("Dirty" link markup in header
markup is stripped out, as appropriate.)
(CreoleListAndNewlineRule): Simplified implementation.
(CreoleRuleRecursive): Supported the global @HtmlAttrStack.
(GetCreoleLinkHtml): New function, reducing code-bloat.
* modules/creoleaddition.pl (CreoleAdditionRule): Simplified
implementation; and handled small caps markup properly, now.
2008-11-06 10:11:02 +00:00
Alex Schroeder
1bddaf7b93 * modules/toc.pl (TocInit): Context-sensitively set the
"$TocConvertH1TagsToH2Tags" option, if not already set.
Basically, we only need the option enabled when the Usemod
markup module is also installed.
2008-11-05 10:11:48 +00:00
Alex Schroeder
e4f3e34e0e * wiki.pl (@HtmlAttrStack): New global variable. This permits
the InElement() and [Add|Close]HtmlEnvironment() family of
functions to add, remove, and search against HTML tag attributes
for all recently stacked HTML tag environments. Previously, tag
attributes were not retained; they were simply returned as text
from the AddHtmlEnvironment() function. Markup modules producing
complex HTML -- particularly, complex HTML having deeply nested
span or div tags -- can leverage the newly rewritten functions,
below, to simplify, streamline, and "clean up" their markup code.
(InElement): Rewritten to use this new variable.
(AddHtmlEnvironment): Rewritten to use this new variable.
(CloseHtmlEnvironment): Rewritten to use this new variable.
(CloseHtmlEnvironments): Rewritten to use this new variable.
(CloseHtmlEnvironmentUntil): Rewritten to use this new variable.
(AddOrCloseHtmlEnvironment): New function. Added so as to avoid
duplicate redefinition in the Creole, Creole Addition, and Usemod
modules.
* modules/usemod.pl (UsemodRule): Corrected erroneous usage of the
InElement() function. (I don't think UsemodRule()	was ever quite
right, really; it's a bit surprising it worked this long!)
2008-11-05 09:42:05 +00:00
Alex Schroeder
03de875729 * modules/toc.pl ($TocIsConvertingH1TagsToH2Tags): Renamed from
"$TocConvertH1TagsToH2Tags".
2008-11-05 06:19:18 +00:00
Alex Schroeder
9e1905b9dd * modules/toc.pl ($TocConvertH1TagsToH2Tags): New option.
(TocRule): Use the new option; principally, this permits Wiki
administrators to prevent this module from converting
"<h1>...</h1>" tags "<h2>...</h2>" tags.
2008-11-05 03:30:04 +00:00
Alex Schroeder
a6543fec1c Adapt tests to changes in the text. 2008-10-29 15:56:55 +00:00
Alex Schroeder
164d0aee65 *** empty log message *** 2008-10-29 15:55:41 +00:00
Alex Schroeder
a1a19d956e (DoTranslationLink): Add more explanation.
($TranslationLinkHelpPage): New option.
2008-10-29 15:55:25 +00:00
Alex Schroeder
b1f1cb8350 Added more tests. 2008-10-29 01:00:06 +00:00
Alex Schroeder
dd87c2c49e (DoTranslationLink): Report a lot
more errors.
2008-10-29 00:54:43 +00:00
Alex Schroeder
d950168338 *** empty log message *** 2008-10-29 00:54:29 +00:00
Alex Schroeder
0f384a1f57 *** empty log message *** 2008-10-28 21:47:56 +00:00
Alex Schroeder
3f15903e2d *** empty log message *** 2008-10-28 21:32:41 +00:00
Alex Schroeder
134825965b (DoTranslationLink): Added better summary. 2008-10-28 21:32:33 +00:00
Alex Schroeder
bd1617dadb (TranslationLinkNewGetFooterLinks):
Fix links generated with %TranslationLinkTarget.
2008-10-28 20:17:21 +00:00
Alex Schroeder
73f6ce4fcf *** empty log message *** 2008-10-28 20:17:12 +00:00
Alex Schroeder
d4cb7c2c91 New. 2008-10-28 19:57:51 +00:00
Alex Schroeder
f5c80439b5 *** empty log message *** 2008-10-28 19:53:35 +00:00
Alex Schroeder
381af5081d (OddMuse::Tokenize): Make the regexp
reusable outside the class.
(process): Use it.
(NewSearchFreeTextTitleAndBody): No longer strip quotes from tags.
(SearchFreeTextGet): Rewrote phrase handling so that tags can be
made mandatory by enclosing them with quotes, but making sure that
extra effort is only spent if there are multiple search terms.
Also if the terms are in fact whole tokens and not just any
phrase, avoid looking opening the page files and doing a regular
search.
2008-10-26 11:27:21 +00:00
Alex Schroeder
69fc3cf100 Added more texts for tag:"foo" and friends. 2008-10-26 11:24:56 +00:00
Alex Schroeder
21c96e8487 *** empty log message *** 2008-10-25 16:31:43 +00:00
Alex Schroeder
347abd8dba (TocRule, TocHeadings): Make sure no h1 headers
can be generated. This makes sure that the headings work just like
they do in the UseMod markup extension.
2008-10-25 16:31:26 +00:00
Alex Schroeder
0b5478cd35 *** empty log message *** 2008-10-25 16:08:18 +00:00
Alex Schroeder
0ba6ffe4cd One more test for the cloud. 2008-10-25 16:08:02 +00:00
Alex Schroeder
a65439b12e Added some POD 2008-10-25 13:06:50 +00:00
Alex Schroeder
2ccfb8a8e4 Add tests to verify that tags with spaces work. 2008-10-24 14:26:48 +00:00
Alex Schroeder
dac1045f1e (process): Allow underscore in
tokens (foo_bar).
(SearchFreeTextTagsRule): Add double quotes around tags that
contain a space ("foo bar"). This should work for technorati links
and the like.
(SearchFreeTextIndex): When indexing a tag containing a space, use
underscores instead ([[tag:foo bar]] is indexed as foo_bar).
(SearchFreeTextCloud): When showing a tag containing an
underscore, replace it with space (foo bar).
(NewSearchFreeTextTitleAndBody): When searching for tags, strip
quotes and replace spaces with underscores. Searching for tag:"foo
bar" will thus result in a search for the tag foo_bar.
(SearchFreeTextGet): No longer tags a tag flag as an argument.
This also affects all the callers (NewSearchFreeTextTitleAndBody).
As tags will end up without quotes and with spaces replaced by
underscores, the special case for tags is gone.
2008-10-24 14:26:21 +00:00
Alex Schroeder
ec814422da *** empty log message *** 2008-10-24 14:21:12 +00:00
Alex Schroeder
7ccd891272 * modules/wiki.pl (OpenHtmlEnvironment): Generalized list closure
by delegating that closure to the "CloseHtmlEnvironments" function.
This permits other extensions (namely, the Creole Markup extension)
to redefine the "CloseHtmlEnvironments" function and thereby
precisely override just when and how list markup is closed.
* modules/creole.pl ($CreoleDashStyleUnorderedLists): New option.
(RunMyRules): New function.
(CreoleRule): Improved conformance to the Wiki Creole standard by
strictly requiring, among other notable things, that horizontal
rules consist of four and only four dashes, that all image links
to images on the Wiki (e.g., image "FreeLinks") be marked as dirty
blocks, that the nowiki markup strictly require the opening and
closing three braces to reside on their own lines having no other
markup, and that preformatted code not extend over multiple blocks.
(CreoleListAndNewLineRule): Avoid handling dash-style unordered
list markup unless explicitly requested by the new
"$CreoleDashStyleUnorderedLists" option being set to 1 (since
that markup is non-standard, and explicitly contradicts the Wiki
Creole standard).
* t/creole.t: Adjusted tests broken by the above modifications;
these were, typically, tests for nowiki and preformatted markup
that assumed a less conformant, gentler handling of that markup.
2008-10-24 04:34:09 +00:00
Alex Schroeder
7e191c8b99 Add tests to verify that comment links do not point to remote sites,
nor do they redirect to remote sites.
2008-10-22 14:02:27 +00:00
Alex Schroeder
bfd9175771 *** empty log message *** 2008-10-22 14:01:50 +00:00
Alex Schroeder
c37e7fb1f7 (NewNearLinksResolveId): Make sure that
comment links are "forbidden" -- they never redirect to a remote
place.
2008-10-22 14:01:05 +00:00
Alex Schroeder
66fc9cd625 * modules/poetry.pl (PoetryInit): New function.
(PoetryRule): Generalized markup handling so as to avoid
conflict with HTML "div" tags produced by other markup
extensions.
2008-10-19 01:51:42 +00:00
Alex Schroeder
dca84f19b6 *** empty log message *** 2008-10-16 19:10:26 +00:00
Alex Schroeder
1a0ad7bec3 Copy the $BannedContent variable. 2008-10-16 04:53:17 +00:00
Alex Schroeder
dd9ec867af *** empty log message *** 2008-10-16 04:53:08 +00:00
Alex Schroeder
53455bb4b9 Whitespace 2008-10-15 22:18:48 +00:00
Alex Schroeder
eeae358b82 (LogBannedContent): Don't remap
BannedContent again.
2008-10-15 22:17:47 +00:00
Alex Schroeder
ae63e6efb5 Smiley images have no border. 2008-10-14 17:16:32 +00:00
Alex Schroeder
6edeff9912 (DoSitemap): Simplified. No longer requires
the admin password because it no longer opens all the pages to get
at the timestamp. Now uses sitemap 0.9 as documented here:
https://www.google.com/webmasters/tools/docs/en/protocol.html
2008-10-12 21:23:31 +00:00
Alex Schroeder
9359a4d4fc (xpath_do): Strip XML preprocessing instruction and
call the XML parser if the HTML parser fails. Now we can write
XPath tests on XML documents.
2008-10-12 21:21:12 +00:00
Alex Schroeder
3500e423b4 *** empty log message *** 2008-10-12 21:19:48 +00:00
Alex Schroeder
075e81ddf8 Apply patch from 1.874 to 1.876 minus the whitespace changes to
revision 1.874.
2008-10-12 19:46:12 +00:00
Alex Schroeder
0ab44433f6 * modules/hibernal.pl (HibernalInit): Implemented context-
dependent defaults for $HibernalPostCommentsAuthorshipMarkup.
(AssayHibernalPostBounds): Corrected several obscure, but
damaging, edge-cases. (This necessitated a rewrite of the
algorithm, unfortunately.)
2008-10-11 13:06:44 +00:00
Alex Schroeder
e833fed540 (CreoleRule): Fix dirty block handling for the
[[page]] and [[page|text]] rules.
2008-10-06 22:51:50 +00:00
Alex Schroeder
d8b76b183a Added a test for a link duplication bug. 2008-10-06 22:38:43 +00:00
Alex Schroeder
f190140b78 * modules/creole.pl (CreoleRule): Allow one newline character following an explicit pipe character to end a table. 2008-10-06 22:21:17 +00:00
Alex Schroeder
e99cdf3cd6 * wiki.pl (ApplyRules): Ensure the regular expression match
position returns the length of the matched string on finishing
application of all rules. ("creole.pl" and "creoleaddition.pl" now
depend on this; it notifies them that rules are now finished.)
* modules/creoleaddition.pl (CreoleAdditionRule): Injected a sanity
check, to ensure closure of blockquotes at the end of a page.
* modules/creole.pl ($CreoleTableCellsAllowBlockLevelElements): New
option.
* modules/creole.pl (CreoleRule): The last, one hopes, of all Creole
table markup modifications (for the moment). The rather complex
table markup code has been modified so as to use the new option, has
been refactored for robustness and strict conformance to the Wiki
Creole standard, and has been well-documented.
* modules/creole.pl (CreoleGetTableHtmlAttributes): Deleted function.
2008-10-06 06:11:20 +00:00