{"thread":{"id":"3575","subject":"[PATCH] Tweak asciidoc output to work with broken docbook-xsl","startedAt":"2006-03-05T23:13:36Z","lastAt":"2006-03-06T01:09:07Z","messageCount":3,"participants":["Francis Daly","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"17210","messageId":"20060305231336.GA21797@craic.sysops.org","threadId":"3575","inReplyTo":null,"subject":"[PATCH] Tweak asciidoc output to work with broken docbook-xsl","fromName":"Francis Daly","fromEmail":"francis@daoine.org","sentAt":"2006-03-05T23:13:36Z","receivedAt":"2006-03-05T23:13:36Z","isPatch":true,"sender":{"key":"francis@daoine.org","avatar":null},"body":"docbook-xsl v1.68 incorrectly converts \"<screen>\" from docbook to\nmanpage by not rendering it verbatim. v1.69 handles it correctly, but\nnot many current popular distributions ship with it.\n\nasciidoc by default converts \"listingblock\" to \"<screen>\". This change\ncauses asciidoc in git to convert \"listingblock\" to \"<literallayout>\", which\nboth old and new docbook-xsl handle correctly.\n\nThe difference can be seen in any manpage which includes a multi-line\nexample, such as git-branch.\n\n---\nThis one may want some consideration, because it involves changing how\ngit interacts with asciidoc in order to make up for how an older version\nof docbook-xsl is broken. Clear?\n\nWhat version of docbook-xsl are people who make git manpages using? If\nit's not 1.69, the manpages (at least, those with multi-line examples)\ndisplay incorrectly. Many current popular distributions seem to be using\nversion 1.68.\n\nhttp://www.kernel.org/pub/software/scm/git/RPMS/x86_64/git-core-1.2.4-1.x86_64.rpm\n\nftp://ftp.kddlabs.co.jp/pub/Linux/packages/fedora/extras/4/i386/git-core-1.2.4-1.fc4.i386.rpm\n\n(found on pbone, with \"redhat/\" removed from url; for Fedora 4)\n\nThe 1.2.1 packages linked from http://packages.debian.org/unstable/devel/git-core\n\nall show the errors.\n\nftp://ftp.kddlabs.co.jp/pub/Linux/packages/fedora/extras/development/i386/git-core-1.2.4-1.fc5.i386.rpm\n\n(found on pbone, with \"redhat/\" removed from the url; for Fedora Other,\npresumably 5)\n\nis correct.\n\nClearly the *right* solution is for binary builders to update their\ntoolchains. Maybe leaving this as-is will be an impetus for them to do so.\n\nBelow is a not-right workaround which allows the git manpages render\ncorrectly when built by someone with an old docbook-xsl package.\n\nIf this is acceptable, all well and good. If not, I'll contact the package\nbuilders and invite them to upgrade or patch before building new packages.\n\n\n Documentation/asciidoc.conf |    7 +++++++\n 1 files changed, 7 insertions(+), 0 deletions(-)\n\n1885a1ac69eabd6fa882f4464d3c66303d707566\ndiff --git a/Documentation/asciidoc.conf b/Documentation/asciidoc.conf\nindex fa0877d..37e9ada 100644\n--- a/Documentation/asciidoc.conf\n+++ b/Documentation/asciidoc.conf\n@@ -23,4 +23,11 @@ ifdef::backend-xhtml11[]\n <a href=\"{target}.html\">{target}{0?({0})}</a>\n endif::backend-xhtml11[]\n \n+# \"unbreak\" docbook-xsl v1.68 for manpages. v1.69 works with or without this.\n+[listingblock]\n+<example><title>{title}</title>\n+<literallayout>\n+|\n+</literallayout>\n+{title#}</example>\n \n-- \n1.2.GIT\n\n-- \nFrancis Daly        francis@daoine.org\n"},{"id":"17215","messageId":"7vr75gcs20.fsf@assigned-by-dhcp.cox.net","threadId":"3575","inReplyTo":"20060305231336.GA21797@craic.sysops.org","subject":"Re: [PATCH] Tweak asciidoc output to work with broken docbook-xsl","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-03-06T00:53:11Z","receivedAt":"2006-03-06T00:53:11Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Francis Daly <francis@daoine.org> writes:\n\n> docbook-xsl v1.68 incorrectly converts \"<screen>\" from docbook to\n> manpage by not rendering it verbatim. v1.69 handles it correctly, but\n> not many current popular distributions ship with it.\n>\n> asciidoc by default converts \"listingblock\" to \"<screen>\". This change\n> causes asciidoc in git to convert \"listingblock\" to \"<literallayout>\", which\n> both old and new docbook-xsl handle correctly.\n\nHave you tested html generation side?  With 1.68 I seem to be\ngetting an disaster.\n\nHow about this instead?\n\n---\ndiff --git a/Documentation/asciidoc.conf b/Documentation/asciidoc.conf\nindex fa0877d..7ce7151 100644\n--- a/Documentation/asciidoc.conf\n+++ b/Documentation/asciidoc.conf\n@@ -18,6 +18,16 @@ ifdef::backend-docbook[]\n {0#</citerefentry>}\n endif::backend-docbook[]\n \n+ifdef::backend-docbook[]\n+# \"unbreak\" docbook-xsl v1.68 for manpages. v1.69 works with or without this.\n+[listingblock]\n+<example><title>{title}</title>\n+<literallayout>\n+|\n+</literallayout>\n+{title#}</example>\n+endif::backend-docbook[]\n+\n ifdef::backend-xhtml11[]\n [gitlink-inlinemacro]\n <a href=\"{target}.html\">{target}{0?({0})}</a>\n"},{"id":"17217","messageId":"20060306010907.GA22105@craic.sysops.org","threadId":"3575","inReplyTo":"7vr75gcs20.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Tweak asciidoc output to work with broken docbook-xsl","fromName":"Francis Daly","fromEmail":"francis@daoine.org","sentAt":"2006-03-06T01:09:07Z","receivedAt":"2006-03-06T01:09:07Z","isPatch":true,"sender":{"key":"francis@daoine.org","avatar":null},"body":"On Sun, Mar 05, 2006 at 04:53:11PM -0800, Junio C Hamano wrote:\n> Francis Daly <francis@daoine.org> writes:\n\n> > asciidoc by default converts \"listingblock\" to \"<screen>\". This change\n> > causes asciidoc in git to convert \"listingblock\" to \"<literallayout>\", which\n> > both old and new docbook-xsl handle correctly.\n> \n> Have you tested html generation side?  With 1.68 I seem to be\n> getting an disaster.\n\nOh how stupid of me.\n\nYes, of course you're right.  The backend matters.\n\nClearly, I don't read the html pages; and no-one (with old stylesheets)\nreads the man pages ;-)\n\nThanks,\n\n\tf\n-- \nFrancis Daly        francis@daoine.org\n"}]}