The prepare target didn't handle wiki.pl itself correctly. This has been
fixed. The command to add the git tag was changed from sed to perl, like
for the other targets. As emoji.pl and smiles.pl refer to permanent
anchors, the addition of the anchor parameter to AddModuleDescription
was obviously misguided and I reverted it.
This makes sure that "make prepare" works once again by allowing an
optional argument to AddModuleDescription with the tag.
AddModuleDescription now also takes an optional anchor which is used by
emoji.pl and smiles.pl.
This commit also updates all the translation files and makes sure that
they all use AddModuleDescription.
SUBURL is another optional feature that allows you to specify some arbitrary link to be displayed in the subtitle.
This might be handy to wikis where some pages are associated with particular URLs
Oddmuse provides several shortcuts, like ‘e’ to edit page or ‘c’ to open
comments page and several others. In most browsers it means that
pressing Alt+Shift+e should automatically click (or at least focus) edit
link. However, by default there is no way to provide accesskey for links
on your wiki pages. This module is trying to solve this.
Unlike Git Extension, this extension initializes git repository right
inside your Page Directory. This approach simplifies the code because
there is no need to copy files from one location to another.
OpenHtmlEnvironment now accepts fourth parameter that defines similar
tags.
creole.pl now passes 'ol|ul' as fourth parameter to OpenHtmlEnvironment.
In addition to that, the creole.pl code was refactored a little bit to
remove copy-pasted part.
Tests were added. As I wrote the tests, I realized that GitRun was
printing to STDOUT even though we had created a local *STDOUT and opened
it to write to a memory file (like PageHtml does). Apparently this is
not inherited to the child process. I now use the solution provided for
in the perldoc for open. Unfortunately it requires a temp file. Trying
to use a memory file results in an error. Temporary files are a mess if
I want to access the output: I need to close it and reopen it for
reading. That's why GitRun only does that if $GitDebug is set. This is
what most of the tests will use: set $GitDebug and examine $GitResult.
At the same time I realized that the error message was never being
triggered. The previous code was tricky because it only considered
showing an error message in a non-void context, ie. when called from
maintenance. I wasn't sure this was an actual benefit and decided to
remove it altogether. I we really want to, we can set $GitDebug and
examine $GitResult in GitCleanup.
Added: $GitPageFile variable. Set it to true if you want to keep
complete page files in git and not just text.
Fixed: previously git extension was chdir-ing into $GitRepo directory
without ever going back, this could have lead to problems if some other
code needed access to file system.
Fixed: now this extension will work smoothly if $DataDir is set to a
relative path.
Fixed: this extension was probably broken for wiki pages starting with
two dashes (e.g. --SomePage), this is now fixed by using -- to indicate
the end of command-line options.
Changed: GitCleanup is now using GitRun instead of backticks (like
everywhere else). It will also print the exit status of 'git commit'
command.
Changed: some tiny style improvements.