[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnu-arch-users] awiki extensions
From: |
Ulrich Pfeifer |
Subject: |
[Gnu-arch-users] awiki extensions |
Date: |
Fri, 08 Apr 2005 16:46:12 +0200 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) |
Hello,
I tried to use the awiki stuff for some small project and found I
needed more than it does provide currently. By a lot of copy and
past, I added support for inline images and raw HTML for everything I
might missing. For easier review, I used to different branches for
the two extensions:
tla register-archive address@hidden 'http://www.wait.de/{archives}/2005'
tla get address@hidden/awiki--img--1.0
or
tla get address@hidden/awiki--escape--1.0
I am willing to update the docs, if the patches can be considered for
the mainline ;-)
Ulrich Pfeifer
Summary:
Adding an "img" directive to the styled-text
Revision:
awiki--img--1.0--patch-1
As an IMG element is quite similar to an A element, I deep copied the
relevant code. I tried to avoid copying functions, but it did not work
out, as I for example was not able to invert the awiki_find_type()
function. An IMG element pretty much looks like an link element. It is
distinguished from it by an exclamation mark immediately following the
opening "<". So this
<!"Kaiserbahnhof 1" images/640x480/kaiserbahnhof1.jpg>
<!images/640x480/kaiserbahnhof2.jpg>
is turned into this:
<img src="images/640x480/kaiserbahnhof1.jpg" alt="Kaiserbahnhof 1"</img>
<img src="images/640x480/kaiserbahnhof2.jpg"
alt="images/640x480/kaiserbahnhof2.jpg"</img>
I am open to suggestions about alternate methods for distinguishing links
from image elements.
modified files:
libawiki-nodes/styled-text-html.c
libawiki-nodes/styled-text-html.h libawiki-nodes/styled-text.c
libawiki-nodes/styled-text.h libawiki/html.c
Summary:
Adding a "html" section for unparsed and unquoted sections
Revision:
awiki--escape--1.0--patch-1
The added section is just the unparsed section stripped of the HTML
quoting. This section may be used as a last resort if desired effects
cannot be achieved with proper awiki methods.
As I do not grok the awiki internals, I was only able to brute force copy
the "unparsed" stuff and butcher the HTML generator.
So this
[[html
Test<b>ing</b>
]]
turns into this:
Test<b>ing</b>
I am not sure how "inlining" a raw HTML snippet should look like.
new files:
libawiki-nodes/html-html.c libawiki-nodes/html-html.h
libawiki-nodes/html.c libawiki-nodes/html.h
modified files:
libawiki/awiki.c