Commit graph

154 commits

Author SHA1 Message Date
Gabriel Wicke
6769ea37c9 bug fixes: no newline at end of includes, interwiki link handling, safety net in the include while loop 2004-05-27 16:08:12 +00:00
Tim Starling
a42101c0a0 Parser cache moved to memcached 2004-05-27 15:24:04 +00:00
Gabriel Wicke
14abd5d7d2 run replaceInternalLinks twice to render links/images in captions of images 2004-05-27 01:38:38 +00:00
Gabriel Wicke
b938a02ef5 image link handling 2004-05-27 01:10:01 +00:00
Gabriel Wicke
3070017d21 adjacent include handling 2004-05-27 00:27:24 +00:00
Gabriel Wicke
2e74792381 typo in magicRFC 2004-05-26 22:03:30 +00:00
Gabriel Wicke
f37a24d487 french space fix 2004-05-26 21:58:03 +00:00
Gabriel Wicke
0958e9dde1 fixed regex 2004-05-26 21:11:54 +00:00
Gabriel Wicke
b97850e021 while instead of if 2004-05-26 21:01:58 +00:00
Gabriel Wicke
e554a146d0 experimental {{foo{{bar}}}} support- Tim, please review this 2004-05-26 20:32:19 +00:00
Gabriel Wicke
4a18c231f9 french spaces return 2004-05-26 18:31:00 +00:00
Gabriel Wicke
3df865dc6b timelines now in strip() 2004-05-26 18:11:52 +00:00
Gabriel Wicke
6d41132f82 temporary removal of tokenizer for performance
To be done:
* integrate timelines into strip() / unstrip()
* 'blank' token handling (french spaces, maybe numbers)
2004-05-26 16:29:04 +00:00
Tim Starling
1a5b4b7000 Fixed profiling 2004-05-26 12:30:36 +00:00
Gabriel Wicke
bce772029e accept urlencoded (interwiki) links 2004-05-25 14:26:14 +00:00
Gabriel Wicke
bd2fd09422 pre handling fix 2004-05-24 10:25:49 +00:00
Tim Starling
587f150879 Changing template argument syntax from {{arg}} to {{{arg}}} 2004-05-23 03:39:24 +00:00
Tim Starling
6a6489ac07 fixed weird bug causing meta to fail spectacularly 2004-05-23 01:21:04 +00:00
Gabriel Wicke
4bcf953707 allow paragraphing inside div's 2004-05-22 18:22:05 +00:00
Brion Vibber
ac9621badb Add categorylinks table to separately list category relationships. Actual
_page_ links to category pages like [[:category:Some cat]] will stay in
links/brokenlinks and not be listed in the category page list anymore.

A link can optionally specify a sort key like this: [[category:cat|Sort me]].
The page will then be sorted in category lists according to the given text
instead of the page name; thus categories may be sorted arbitrarily, by
last name or whatever.

There is also a timestamp field included on gwicke's request; this is not
used yet. Also it will currently be updated at every edit of the page,
this can be changed by implementing differential updating for the cat links.

TODO:
* Make sure that automatic sort keys are updated on page rename.
* Make sure cateory pages get cache-invalidated and purged
* Use proper text sorting instead of raw binary sort
* Allow specification of the display style on category pages: comma list
  or bullet list or number list; by sortkey or by timestamp; etc
2004-05-15 00:29:39 +00:00
Gabriel Wicke
53acea5138 don't create a pre for a whitespace-only line 2004-05-14 22:09:33 +00:00
Gabriel Wicke
32c2c1272a strip out urlencoded \  (inserted for french spaces, e.g. first space in 'something : something') for section anchors 2004-05-14 13:38:33 +00:00
Gabriel Wicke
51be5ecccf accidentially removed nl fix 2004-05-14 01:18:12 +00:00
Gabriel Wicke
d181a35170 Made strong/em handling more forgiving against unbalanced ticks
* close any open em's or strong tags before each heading
* close any open em's or strong's at the end of the text
2004-05-14 00:18:43 +00:00
Jens Frank
60ffb9f53a fixed '''Caesar''''s bug where 4 ticks where not properly handled. 2004-05-13 20:48:34 +00:00
Jens Frank
f2752c7fc0 Repaired rendering of ''emph ''' bold emph '' bold ''' to produce valid HTML. 2004-05-13 19:47:09 +00:00
Erik Moeller
2b029cff36 fix duplicate TOC problem again, which is independent of section folding
feature (occurred when template contained more than three headlines).
2004-05-13 17:16:50 +00:00
Gabriel Wicke
6af7c5ce7b After a longer phone call Erik and me agreed on working on an equivalent feature most likely based on categories that interacts better with caching. More discussion on to follow.
Removed with Erik's agreement.
2004-05-13 14:17:44 +00:00
Erik Moeller
201af52713 restore section folding 2004-05-13 12:20:59 +00:00
Gabriel Wicke
4f9f8df852 Silenced this, $token["pos"] was undefined when parsing '''hi'''''hi'' which created a notice. Output is fine, so silencing it should be ok. 2004-05-13 12:08:02 +00:00
Gabriel Wicke
df08e4792a removed section folding 2004-05-13 11:54:19 +00:00
Erik Moeller
ac44b37065 fix collapsing problem with templates (templates would be expanded and
formatted first and thus cause a duplicate TOC, the internal parser now has
an isMain parameter to specify whether it is called from the main article
text, or from a template.
2004-05-12 22:01:25 +00:00
Erik Moeller
cc357845fc fix a couple of section collapsing bugs 2004-05-12 21:38:01 +00:00
Erik Moeller
c245bfe3ae fix a =/== typo 2004-05-12 13:55:40 +00:00
Erik Moeller
472272dc61 New feature:
Automatic or manual collapsing and expanding of long pages.
Pages can be collapsed automatically according to a size threshold
set in the user preferences. Pages can be collapsed manually by clicking
the "Collapse" link in the TOC.

When a page is collapsed, only the intro & TOC are displayed. The
individual TOC lines link to section views, which can be individually edited
(classic section editing).

Section editing/viewing behavior has also been improved. When a section
with subsections is viewed or edited, all subsections are also loaded.

Known issues:
- After saving a section, we return to the full article view
rather than the section view, even if we previously were in section view
mode.
- Should work with Standard and Monobook, not tested with Cologne Blue yet.
- In Monobook, no backlink to the mother article is shown during section
viewing (Gabriel, can you fix that?)
2004-05-12 13:26:36 +00:00
Gabriel Wicke
fd7106bf4c preserve newline before braced variables 2004-05-12 12:48:36 +00:00
Brion Vibber
33f1e77c11 PHP 4.1.2 compatibility fixes (based on patch submission by Asheesh Laroia)
Also, urlencode anchor names for non-ascii compatibility. This is the
recommendation of HTML 4.01 standard in B.2.1, as far as I can tell.
Works in UTF-8 at least for IE6/win, Firefox, Safari.
2004-05-10 01:54:56 +00:00
Brion Vibber
5bcd470847 Add $wgUserHtml option; set to false to disable use of user-supplied HTML
in wiki markup. Note that <nowiki>, <pre>, <math> etc are counted as wiki
markup. That <pre> looks like HTML's <pre> is a coincidence; they behave
differently (<pre> also disables other wiki markup like <nowiki> does).

Also, escape the <math> tag when $wgUseTeX is off.
2004-05-09 12:04:59 +00:00
Brion Vibber
762b8e9b47 Allow installing and running the wiki on a server where ini_set has been
disabled via disable_functions in php.ini (bug #928168)

The PHPTal skin doesn't function unless the PEAR bits are in include_path,
so it's disabled if ini_set can't be used. If the files are manually placed
or a real PEAR installation is available with the right stuff, one can
use $wgUsePHPTal = true;

There are likely other things that need to be taken into account for
restricted environments. Maintenance scripts haven't been tweaked for
such an environment yet either.
2004-05-09 10:37:00 +00:00
Tim Starling
8f22cb45b1 include_once -> require_once 2004-05-07 13:43:10 +00:00
Gabriel Wicke
dc58bc8458 add encoding option 2004-05-07 09:06:45 +00:00
Gabriel Wicke
6267cadb18 pipe for stderr was troublesome on pages with many errors (buffer filled up), generic message now 2004-05-06 21:06:23 +00:00
Gabriel Wicke
315d66c796 * simpler html strip function if tidy is used
* error reporting if tidy doesn't honour force-output option *and* html is severely broken (if unknown elements are encountered), never return uncleaned version
2004-05-06 19:01:05 +00:00
Gabriel Wicke
3a4d20b02f return the uncleaned text if tidy isn't there or if nothing is returned 2004-05-06 13:38:23 +00:00
Gabriel Wicke
c6fe32ac5b New tidy function that uses html tidy (http://tidy.sf.net) to make sure the output is valid xhtml/xml
Disabled by default, set $wgUseTidy = true to enable
Possible improvements:
* Tweaking it to work on windows (don't know if that's possible)
* use the php5 built-in tidy module if available, that seems to allow a fine-grained config on which tags are allowed as well (see http://www.php.net/manual/en/ref.tidy.php)
2004-05-06 12:50:04 +00:00
Gabriel Wicke
4671bf4b40 \n rather than \n (although they both seem to work) 2004-05-02 23:53:10 +00:00
Gabriel Wicke
dea42dfed8 experimental fix to the template-inserts-newline-on-save problem 2004-05-02 23:18:25 +00:00
Gabriel Wicke
96bdd88017 two bug fixes: html comments don't add a paragraph anymore, lang links don't eat following text anymore 2004-05-02 21:27:56 +00:00
Brion Vibber
40e3893b51 Partial fix for #595869 ": in URL after ; parsed as list item"
Also put sensible names on many variables in doBlockLevels() and added
some comments.

This partial fix requires there to be a space prior to the post-; : to get
parsed as the definition:
; def title : def text

thus it doesn't trigger on a URL or namesapce properly written:
; def title [http://link] : def text

However the regexp will fail and break things if there's an actual space
before a : in the link, which is possible in piped text etc. It may be
desirable to deal with this at the tokenizer level, to keep it clear
of links, tags, etc.
2004-04-29 06:16:21 +00:00
Erik Moeller
dfecc217ab fix longstanding bug with section editing where section headers within
<nowiki> or <!-- .. --> tags would cause it to miscount section
numbers. Parser::extractTags modified to allow stripping HTML comments
as well. Note: Presently HTML comments are completeley removed from
the output using preg_replace. Should they ever be rendered instead,
Parser::extractTags should be used.
2004-04-28 04:50:35 +00:00