* [virtio-dev] [PATCH] fixupdiff: escape ^ caret
@ 2022-04-19 16:30 Michael S. Tsirkin
2022-04-20 12:57 ` [virtio-comment] " Cornelia Huck
0 siblings, 1 reply; 3+ messages in thread
From: Michael S. Tsirkin @ 2022-04-19 16:30 UTC (permalink / raw)
To: virtio-comment, virtio-dev; +Cc: virtio
Since commit:
commit 1e30753d53d222fbe955f0643583d756105d557e
Author: Jan Kiszka <jan.kiszka@siemens.com>
Date: Fri Oct 11 13:43:41 2019 +0200
Fix ^= in example code
Trying to escaping ^ here only leaves the backslash in the output.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
we have plain ^ inside listing. Escape it with \ but only
if not already escaped (as output of diff with old source will be).
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
fixupdiff.pl | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/fixupdiff.pl b/fixupdiff.pl
index f50cf26..e7d3a0f 100644
--- a/fixupdiff.pl
+++ b/fixupdiff.pl
@@ -35,6 +35,10 @@ while (<>) {
$line =~ s/%DIFDELCMD\s+< //;
if (not $line =~ m/\\(?:begin|end)\{lstlisting\}/) {
$line =~ s/([#&{} ])/\\$1/g;
+ #be careful: do not escape \^
+ $line =~ s/([^\\])(\^)/$1\\$2/g;
+ #also at beginning of line
+ $line =~ s/^(\^)/\\$1/g;
if ($add) {
$line =~ s/(.*)/\$\\DIFdel\{$1\}\$/;
} else {
--
MST
---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [virtio-comment] Re: [virtio-dev] [PATCH] fixupdiff: escape ^ caret
2022-04-19 16:30 [virtio-dev] [PATCH] fixupdiff: escape ^ caret Michael S. Tsirkin
@ 2022-04-20 12:57 ` Cornelia Huck
2022-04-20 15:33 ` Michael S. Tsirkin
0 siblings, 1 reply; 3+ messages in thread
From: Cornelia Huck @ 2022-04-20 12:57 UTC (permalink / raw)
To: Michael S. Tsirkin, virtio-comment, virtio-dev; +Cc: virtio
On Tue, Apr 19 2022, "Michael S. Tsirkin" <mst@redhat.com> wrote:
> Since commit:
>
> commit 1e30753d53d222fbe955f0643583d756105d557e
> Author: Jan Kiszka <jan.kiszka@siemens.com>
> Date: Fri Oct 11 13:43:41 2019 +0200
>
> Fix ^= in example code
>
> Trying to escaping ^ here only leaves the backslash in the output.
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
>
> we have plain ^ inside listing. Escape it with \ but only
> if not already escaped (as output of diff with old source will be).
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
> fixupdiff.pl | 4 ++++
> 1 file changed, 4 insertions(+)
Thanks, pushed as an editorial update.
This publicly archived list offers a means to provide input to the
OASIS Virtual I/O Device (VIRTIO) TC.
In order to verify user consent to the Feedback License terms and
to minimize spam in the list archive, subscription is required
before posting.
Subscribe: virtio-comment-subscribe@lists.oasis-open.org
Unsubscribe: virtio-comment-unsubscribe@lists.oasis-open.org
List help: virtio-comment-help@lists.oasis-open.org
List archive: https://lists.oasis-open.org/archives/virtio-comment/
Feedback License: https://www.oasis-open.org/who/ipr/feedback_license.pdf
List Guidelines: https://www.oasis-open.org/policies-guidelines/mailing-lists
Committee: https://www.oasis-open.org/committees/virtio/
Join OASIS: https://www.oasis-open.org/join/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [virtio-dev] [PATCH] fixupdiff: escape ^ caret
2022-04-20 12:57 ` [virtio-comment] " Cornelia Huck
@ 2022-04-20 15:33 ` Michael S. Tsirkin
0 siblings, 0 replies; 3+ messages in thread
From: Michael S. Tsirkin @ 2022-04-20 15:33 UTC (permalink / raw)
To: Cornelia Huck; +Cc: virtio-comment, virtio-dev, virtio
On Wed, Apr 20, 2022 at 02:57:04PM +0200, Cornelia Huck wrote:
> On Tue, Apr 19 2022, "Michael S. Tsirkin" <mst@redhat.com> wrote:
>
> > Since commit:
> >
> > commit 1e30753d53d222fbe955f0643583d756105d557e
> > Author: Jan Kiszka <jan.kiszka@siemens.com>
> > Date: Fri Oct 11 13:43:41 2019 +0200
> >
> > Fix ^= in example code
> >
> > Trying to escaping ^ here only leaves the backslash in the output.
> >
> > Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> >
> > we have plain ^ inside listing. Escape it with \ but only
> > if not already escaped (as output of diff with old source will be).
> >
> > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> > ---
> > fixupdiff.pl | 4 ++++
> > 1 file changed, 4 insertions(+)
>
> Thanks, pushed as an editorial update.
Sounds good! OK let me compile this all, upload and we can
get the ball rolling with the 1st vote.
--
MST
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-04-20 15:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-19 16:30 [virtio-dev] [PATCH] fixupdiff: escape ^ caret Michael S. Tsirkin
2022-04-20 12:57 ` [virtio-comment] " Cornelia Huck
2022-04-20 15:33 ` Michael S. Tsirkin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.