2005-03-18 11:17:15

by Martin Waitz

[permalink] [raw]
Subject: [PATCH] docbook: fix escaping of kernel-doc

hoi :)

the following patch fixes a bug I introduced with the last patches
of the DocBook generation.

Signed-off-by: Martin Waitz <[email protected]>

---
Please apply.

... and I really have to redo my bitkeeper repository as it
is full of merge artifacts as BK did not note the fact that
the patches were applied using normal patches.

I guess I have to use one complete tree per patch and recreate
the public repo as a combination of the individual ones.
Alternatives?

diff -Nru a/scripts/kernel-doc b/scripts/kernel-doc
--- a/scripts/kernel-doc 2005-03-18 11:51:17 +01:00
+++ b/scripts/kernel-doc 2005-03-18 11:51:17 +01:00
@@ -1626,11 +1655,11 @@

# replace <, >, and &
sub xml_escape($) {
- shift;
- s/\&/\\\\\\amp;/g;
- s/\</\\\\\\lt;/g;
- s/\>/\\\\\\gt;/g;
- return $_;
+ my $text = shift;
+ $text =~ s/\&/\\\\\\amp;/g;
+ $text =~ s/\</\\\\\\lt;/g;
+ $text =~ s/\>/\\\\\\gt;/g;
+ return $text;
}

sub process_file($) {


--
Martin Waitz


Attachments:
(No filename) (956.00 B)
signature.asc (189.00 B)
Digital signature
Download all attachments

2005-03-18 11:23:27

by Andrew Morton

[permalink] [raw]
Subject: Re: [PATCH] docbook: fix escaping of kernel-doc

Martin Waitz <[email protected]> wrote:
>
> ... and I really have to redo my bitkeeper repository as it
> is full of merge artifacts as BK did not note the fact that
> the patches were applied using normal patches.

Normally bk would handle that, but I have an irritating habit of stripping
off all the trailing whitespace which people keep trying to add to the
kernel.

> I guess I have to use one complete tree per patch and recreate
> the public repo as a combination of the individual ones.
> Alternatives?

Export all the csets as unified diffs, reapply them.