Commit graph

340 commits

Author SHA1 Message Date
Happy-melon
edd817184c Revert r64478 - April Fool's is well over. 2010-04-03 10:13:34 +00:00
Jack Phoenix
d561849fca documentation tweak 2010-04-02 20:56:11 +00:00
Happy-melon
8f58352be6 Rewrite the parser in a more friendly and accessible implementation... 2010-04-01 10:50:43 +00:00
Happy-melon
bec172cb54 Rationalise comment format. Slightly controversial, perhaps, but I've pretty much borked svn blame already :D Also other doc and spacing fixes. 2010-03-30 21:53:56 +00:00
Happy-melon
af56e348c1 Overhaul code format to coding conventions. 2010-03-30 21:20:05 +00:00
Aryeh Gregor
759db54cc2 Correctly handle <abbr> followed by ISBN
Bug 22905.  Patch based on one submitted by Solitarius.  Basically, we
were assuming that anything matching <a.*?</a> was a link and ignoring
it so as to avoid nested links, but that matched the HTML from

<abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]

so the ISBN didn't work.  Parser test committed, fails without the
Parser.php change.
2010-03-24 13:42:37 +00:00
Alexandre Emsenhuber
6067875881 Typo in comment 2010-03-18 11:42:26 +00:00
Alexandre Emsenhuber
70969c83ce * (bug 22772) {{#special:}} parser function now works with subpages 2010-03-16 19:47:24 +00:00
Raimond Spekking
20e131c3a2 * (bug 21981) Add parameter 'showfilename' to <gallery> to automatically apply the names of the individual files within the gallery 2010-03-13 09:43:37 +00:00
Conrad Irwin
a88a955ebf Merge fixes to ?preload= from /branches/conrad/ (cf. bug 5210, r62864, r62035) 2010-03-03 02:41:14 +00:00
Aaron Schulz
b020bc34ca Removed unused var 2010-02-24 03:38:06 +00:00
Tim Starling
c166e49bca Fixes for r62505:
* In MagicWordArray::matchStartAndRemove(), fixed the case where the length of localised synonym is not precisely the length of the magic word ID plus one
* Fixed the case where matchStartAndRemove() removes the entire string, send empty string not false
* Fix brace style
2010-02-22 07:02:12 +00:00
Domas Mituzas
ac961eca63 global already imported few lines above 2010-02-21 17:07:37 +00:00
Tim Starling
64bad51b7d Fixed unnecessary assignment (from r61913) 2010-02-19 23:21:58 +00:00
Tim Starling
f5b882aadc Moving Conrad's recent parser work out to a branch. Reverted r62434, r62416, r62150, r62111, r62085, r62081, r62080, r62077, r62076, r62069, r62049, r62035. 2010-02-19 05:19:32 +00:00
Mark A. Hershberger
5259e9009d * When I found it, I cried. fixes bug #22501
* Also, fix up showtitle for parser tests to always give a title, whether we're setting a display title or not.
2010-02-16 03:37:19 +00:00
Mark A. Hershberger
b03bcaacd9 fixes #22501 follow up r61101 remove superfluous, buggy code that was over-rideing displaytitle 2010-02-15 20:18:05 +00:00
Conrad Irwin
8b23dcc084 clean r61713 (and r61710) per code review 2010-02-15 09:34:51 +00:00
Mark A. Hershberger
daf51bcdb3 follow up r61101 for special pages like Special:Version and Special:RecentChanges 2010-02-15 08:36:10 +00:00
Alexandre Emsenhuber
e254b8e971 Fixed some doxygen warnings 2010-02-14 21:23:38 +00:00
Platonides
eb433b42a0 Follow up r62436 comments.
s/Title::newFromUrl/Title::newFromURL/
All these usages should be reviewed. Make it easy to grep using the canonical form.
Additionally fix the typo.
2010-02-13 23:58:30 +00:00
Conrad Irwin
26d1b34771 Fix for <poem> after r62416 2010-02-13 14:41:04 +00:00
Conrad Irwin
ae1e32d350 Deprecate old undocumented workaround to bug 2257 (setTransparentTagHook) 2010-02-13 02:22:14 +00:00
Alexandre Emsenhuber
f0683f8e08 Whitespaces fixes 2010-02-11 14:57:43 +00:00
Conrad Irwin
76d285dc36 More sensible semantics for pipe trick with section links after r62076
[[hello#world|]] -> [[hello#world|world]] (not [[hello#world]])
2010-02-09 01:05:49 +00:00
Chad Horohoe
5fd1b2e4ba Cleanup r62111, don't pass by reference 2010-02-08 11:30:17 +00:00
Conrad Irwin
7a1fc37382 partial revert for r62081. Make {{PIPETRICK}} like {{PAGENAME}}, add {{PIPETRICKE}}. fix r62077 better. 2010-02-08 02:07:15 +00:00
Conrad Irwin
fe91f53371 Fix bug 20339 allow pipe-trick in log reasons
follows on from r62069 moving logic from Parser into Linker 
(copying brion's technique for dealing with subpages)
2010-02-07 14:50:55 +00:00
Conrad Irwin
0443dd4c5c Fixes for r62077
{{pipetrick:}} -> {{#pipetrick:}} per IAlex
 clearer documentation per Siebrand
 parser test for new magic word.
2010-02-07 13:17:05 +00:00
Conrad Irwin
14ebd07539 Initialize parser properly in getTransclusionText() 2010-02-07 11:59:58 +00:00
Conrad Irwin
d036809f36 Bug 7264 - Magic word to give Page Title as if pipe-trick performed on it {{pipetrick:}} 2010-02-07 02:36:32 +00:00
Conrad Irwin
8e258183ae Update Pipe Trick semantics per bug 845 and bug 21660
Allows fullwidth variants of "(", ")", and "," everywhere
Adds [[#section|]] -> [[#section|section]] (initial # only)
Adds [[/sub/section|]] -> [[/sub/section|section]]
2010-02-07 02:15:26 +00:00
Conrad Irwin
13cc94a6c0 Allow pipe trick to work after PST.
Fixes bug 4099, bug 8785, partially bug 16714, bug 2700.
2010-02-06 15:00:45 +00:00
Conrad Irwin
ee6dd72b7f style fixes for r62035 2010-02-05 21:52:37 +00:00
Conrad Irwin
f367303c9e bug 5210 - add getTransclusionText() to the Parser to remove the horrible (and
very broken) attempt to reimplement bits of the preprocessor in 
           EditPage.php.
2010-02-05 16:49:21 +00:00
Tim Starling
c7a8875329 * Fix for r57997 and bug 21222: move math, gallery, pre and nowiki to a new module called CoreTagHooks, analogous to CoreParserFunctions.
* Extended the return interface for tag hooks in a way analogous to the one for parser functions, allowing <nowiki> and <html> to specify that they want to be in the nowiki replacement array instead of the general replacement array.
* Removed ParserOptions::setUseTeX() and related. If <math> is going to be registered in firstCallInit(), then it needs to be stable across multiple parser calls and not change based on parser options. Only one extension caller.

In parserTests.inc: 
* Fixed parser test failures due to $wgMathDirectory not being properly set up. The math directory of the host wiki was being used, leading to a parser test failure if it was not writable.
* Fixed message cache hack from r15502. Made parser tests not fail in the case where a tested message is overwritten by the local wiki. All tests now pass on my installation.
2010-02-03 07:10:58 +00:00
Tim Starling
5ff4947c48 Remove <a> tag hook for now, pending resolution of implementation issues as discussed on CR r58717. 2010-02-03 05:07:57 +00:00
Mark A. Hershberger
93562ac595 fixes problem on PHP 5.1 where titles are displayed as "Object":
TimStarling sez: "presumably some clever person has been using __toString()"
Why did it have to be in code *I* wrote?
2010-02-01 02:45:23 +00:00
Aryeh Gregor
a889c89d1b Require $wgHtml5 for $wgExperimentalHtmlIds
This way, if you want to disable HTML5 you don't have to turn off an
extra setting to maintain validity.
2010-02-01 01:43:07 +00:00
Max Semenik
d6e5fcf83d (bug 16039) Text disappearing after a bad image 2010-01-31 18:26:37 +00:00
Conrad Irwin
7dee03cbdf Fix for r61710. Changing subst: to subst:$1 would cause huge problems with localisation
instead add some proper functions to MagicWord.php to deal with the situation.
2010-01-30 12:46:16 +00:00
Conrad Irwin
13eb1fe98e bug 22297 - "syntax for substitution that doesn't break transclusion"
Adds "safesubst:$1" that works similarly to "subst:$1"
(relevant to bug 5453, bug 16714, bug 4484)
2010-01-30 11:58:19 +00:00
Aryeh Gregor
f8879bfd2b Refactor $wgEnforceHtmlIds code
Renamed setting to $wgExperimentalHtmlIds, off by default, and updated
the code to enforce the much laxer HTML5 rules.  Still needs testing in
various browsers.
2010-01-29 21:44:01 +00:00
Tim Starling
8b9bedbad7 Revert r61528, r61527, r61526, r61525, r61519, r61515, r61053, r61052 (Parser::doQuotes() rewrite). Lots of issues to discuss, needs more review than I have time to give it pre-1.16. I'll split it out to a branch. 2010-01-27 02:41:22 +00:00
Platonides
11f8b8390c Step 4: Profit!!
Add and use PregSplitIterator instead of a direct preg_split.
Slower, but with an upper bound on memory usage.
2010-01-26 18:58:07 +00:00
Platonides
68f5258701 Step 3: Balance the quotes directly on $text
Side effect: Some ' are converted to &#39; on output.
2010-01-26 18:56:50 +00:00
Platonides
fec5f913b9 Step 2: Take out countBoldAndItalic() 2010-01-26 18:55:56 +00:00
Platonides
e1143d8cdd Step 1: Apply attachment 2 from bug 18765. 2010-01-26 18:55:10 +00:00
Platonides
e1c37b835b Parser documentation:
"We are not counting sequences of five apostrophes." comment is wrong. 
It was added on r4578, when they stopped being counted, but since r4747 (fixing bug 40) they are counted again.

Clarify what $first variables are.
2010-01-26 16:16:00 +00:00
Platonides
bd82b2a754 Cosmetic changes from r61052 comments:
else if -> elseif
 Space after # 
 Prefer !== to !=
2010-01-26 11:57:01 +00:00