From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.devel Subject: Re: nXML mode maintenance and enhancement Date: Wed, 23 May 2018 22:15:05 +0700 Message-ID: References: <87603e4lhz.fsf@gmail.com> <87d0xmctsk.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="000000000000c576f4056ce10021" X-Trace: blaine.gmane.org 1527088460 30188 195.159.176.226 (23 May 2018 15:14:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 23 May 2018 15:14:20 +0000 (UTC) To: nyraghu27132@gmail.com, Emacs developers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 23 17:14:15 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fLVSx-0007jd-Eg for ged-emacs-devel@m.gmane.org; Wed, 23 May 2018 17:14:15 +0200 Original-Received: from localhost ([::1]:34037 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fLVV4-0001xF-IL for ged-emacs-devel@m.gmane.org; Wed, 23 May 2018 11:16:26 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58049) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fLVU2-0001qr-Um for emacs-devel@gnu.org; Wed, 23 May 2018 11:15:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fLVU1-0006e4-0X for emacs-devel@gnu.org; Wed, 23 May 2018 11:15:22 -0400 Original-Received: from mail-oi0-x232.google.com ([2607:f8b0:4003:c06::232]:36703) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fLVU0-0006ds-NT for emacs-devel@gnu.org; Wed, 23 May 2018 11:15:20 -0400 Original-Received: by mail-oi0-x232.google.com with SMTP id v2-v6so19822816oif.3 for ; Wed, 23 May 2018 08:15:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=+zkNvLS6/Hu4a5ENYQRMS4HX0BiuLpwOU8vt6D/SEAY=; b=KZvyHx73lEnTiI/ZwXz8ZXTwUZgp+0lVP2mttvbtdPkkpYA5YAv4PXNNuHV1y+HQDV JUJ/fjaDUgta221SPyxmTrFuQyaUjwL0ZlSjFSCB4vXWaXasMY1Y/DQBLUrnuucntIJ8 NwDfXSIpNDPJm9SM45/6Tpqgv0+K/bs06vXfd5R1lpZNd9A2kUVmyEWG6ZZW2Cneoicu S8ZxFaP641vbr6fVEYt/yfVSxxDPkK6IrmN+fXaxb323kStia35EcubnZEQ9HV4Poa3V VfEmnsc6OsGtrjA7EndVywdQ6R/oKdOusRMVU/Xp5RM/+QR+O8Js6CBPFmfsbCjB/gZA wPAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=+zkNvLS6/Hu4a5ENYQRMS4HX0BiuLpwOU8vt6D/SEAY=; b=MpiJ2TSplbggUKW4Bf8RgPLt1TQdXZlQEuFXIuiOciTzj03bF1CzXuJXHeYwFxtPEj hK/UKrw4KYdrSWFqgh3QYOOYLMCYA544SKRUv5vAMU9BOZqYFvid7wk6v3pqT6BqQZEg G6550R2sBZopYWdCcvIZ9VfAxgU7Iy0alpeYjc0f4F8tQFwU9hrzS34Ak0rq7aRqYLdH tllz7Mp7L2KWCbTE66ioNF4pBow8RGDUYb1ae9k4JYkBj12W7+0wn0PAtOzAlKSqENsk ykCA/nfTKABnqK1dSgJj1sF4QIHPh8aVMDm5rk4kPHj+1psSNw4iK/jqPMgm5cswoSBP M1PQ== X-Gm-Message-State: ALKqPwfi76aGCgtlXXj05xSM7UnoCLGDG3UrGuZmzgdYAogEnc2RUo6P zRC0XjSSUgKUhQccL1RsvKV9sDBTLmyA8vEzLZo= X-Google-Smtp-Source: AB8JxZow3f+AZHDkt7I+fr3wS1o5qcCLlr8EmS7MnyP7jVl0mX2V4AEHrflrrKjzOgKDhEwjjolPl13EnIMYaghNwzM= X-Received: by 2002:aca:2b13:: with SMTP id i19-v6mr1648059oik.292.1527088519927; Wed, 23 May 2018 08:15:19 -0700 (PDT) In-Reply-To: <87d0xmctsk.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4003:c06::232 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:225606 Archived-At: --000000000000c576f4056ce10021 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, May 23, 2018 at 10:03 PM N. Raghavendra wrote: > > There is not and cannot be One True Way to indent XML, for all users an= d > > uses of nXML. > Sure, the user can always change it. Every mode comes with a default > indentation style. I am only suggesting that the default indentation > rules of nXML conform to those of the SGML and PSGML modes. And I=E2=80=99m suggesting that text markup languages constitute a small po= rtion of all XML-based formats, and thus the default rules might be good enough for the majority of the formats. > > [Customizing indentation] involves: hooking =E2=80=98rng-schema-change-= hook=E2=80=99; > > in the hook function, looking at =E2=80=98rng-current-schema=E2=80=99 t= o see if its =E2=80=98caddr=E2=80=99 > > is "html"; and, if so, pointing =E2=80=98indent-line-function=E2=80=99 = at my own function > > that pretty much has to reimplement the whole of =E2=80=98nxml-indent-l= ine=E2=80=99 from > > scratch, in about 250 lines of Elisp. > I wonder if you can share your code here; perhaps I or someone else can > try to adapt it into a general function in nXML. Why not. Warning, personal-use-quality code ahead. Magic words, for all code in the attached file that is not copied from nxml= : I dedicate any and all copyright interest in this software to the public domain. I make this dedication for the benefit of the public at large and to the detriment of my heirs and successors. I intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law. --000000000000c576f4056ce10021 Content-Type: text/x-emacs-lisp; charset="UTF-8"; name="yk-xhtml-indent.el" Content-Disposition: attachment; filename="yk-xhtml-indent.el" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_jhj8zqch0 KGRlZnZhciB5ay14aHRtbC16ZXJvaW5kZW50LXRhZ3MKICAobGlzdCAiaHRtbCIKICAgICAgICAi dGl0bGUiICJzdHlsZSIKICAgICAgICAiYm9keSIgImFydGljbGUiICJzZWN0aW9uIgogICAgICAg ICJoMSIgImgyIiAiaDMiICJoNCIgImg1IiAiaDYiCiAgICAgICAgInAiICJwcmUiICJmaWdjYXB0 aW9uIiAibWFpbiIKICAgICAgICAiYSIgImVtIiAic3Ryb25nIiAic21hbGwiICJzIiAiY2l0ZSIg InEiICJkZm4iICJhYmJyIiAiZGF0YSIgInRpbWUiCiAgICAgICAgImNvZGUiICJ2YXIiICJzYW1w IiAia2JkIiAic3ViIiAic3VwIiAiaSIgImIiICJ1IiAibWFyayIKICAgICAgICAicnVieSIgInJi IiAicnQiICJydGMiICJycCIgImJkaSIgImJkbyIgInNwYW4iCiAgICAgICAgInRhYmxlIiAiY2Fw dGlvbiIKICAgICAgICAic2NyaXB0IikKICAiVGFncyB3aG9zZSBlbGVtZW50c+KAmSBjb250ZW50 IHNob3VsZCBub3QgYmUgaW5kZW50ZWQuIFRoaXMKc2hvdWxkIGluY2x1ZGUgaW5saW5lIGVsZW1l bnRzIGFuZCBtYXkgaW5jbHVkZSBjb250YWluZXIKZWxlbWVudHMgZm9yIHdoaWNoIGluZGVudGF0 aW9uIGFkZHMgbm8gdmFsdWUuIikKCihkZWZ2YXIgeWsteGh0bWwtY29uZG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BuaWwgaWYgbm90LgoKRGVzdHJveXM6IHhtbHRvayBzdGF0ZS4iCiAgKHNh dmUtZXhjdXJzaW9uCiAgICAoYmFjay10by1pbmRlbnRhdGlvbikKICAgIChjYXRjaCAneWsteGh0 bWwtaW5kZW50LXJlc3VsdAogICAgICAod2hpbGUgKDwgKHBvaW50LW1pbikgKHBvaW50KSkKICAg ICAgICAobnhtbC10b2tlbi1iZWZvcmUpCiAgICAgICAgKGxldCAoKHRva2VuLXN0YXJ0IHhtbHRv ay1zdGFydCkpCiAgICAgICAgICAoY29uZAogICAgICAgICAgICgoZXEgeG1sdG9rLXR5cGUgJ3N0 YXJ0LXRhZykKICAgICAgICAgICAgKGlmIChtZW1iZXIgKHhtbHRvay1zdGFydC10YWctbG9jYWwt bmFtZSkgeWsteGh0bWwtbm9pbmRlbnQtdGFncykKICAgICAgICAgICAgICAgICh0aHJvdyAneWst eGh0bWwtaW5kZW50LXJlc3VsdCAnbm9pbmRlbnQpCiAgICAgICAgICAgICAgKGdvdG8tY2hhciB0 b2tlbi1zdGFydCkpKQogICAgICAgICAgICgoZXEgeG1sdG9rLXR5cGUgJ2VuZC10YWcpCiAgICAg ICAgICAgIChjb25kaXRpb24tY2FzZSBuaWwKICAgICAgICAgICAgICAgIChwcm9nbgogICAgICAg ICAgICAgICAgICAobnhtbC1zY2FuLWVsZW1lbnQtYmFja3dhcmQgKHBvaW50KSkKICAgICAgICAg ICAgICAgICAgKGdvdG8tY2hhciB4bWx0b2stc3RhcnQpKQogICAgICAgICAgICAgIChueG1sLXNj YW4tZXJyb3IgKGdvdG8tY2hhciB0b2tlbi1zdGFydCkpKSkKICAgICAgICAgICAodAogICAgICAg ICAgICAoZ290by1jaGFyIHRva2VuLXN0YXJ0KSkpKSkKICAgICAgbmlsKSkpCgoKKGRlZnVuIHlr LXhodG1sLWNvbXB1dGUtaW5kZW50LS1mb3ItY2xvc2luZy10YWcgKCkKICAiUmV0dXJuIGluZGVu dGF0aW9uIGZvciBhIHNpbm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iAgICAgICAgICAgICAgICAgICAo cG9pbnQpIG5pbAogICAgICAgICAgICAgICAgICAgKC0gKHBvaW50KQogICAgICAgICAgICAgICAg ICAgICAgbnhtbC1lbmQtdGFnLWluZGVudC1zY2FuLWRpc3RhbmNlKSkKICAgICAgICAgICAgICAg IChueG1sLXNjYW4tZXJyb3IgbmlsKSkpKQogICAgICAgICAoYW5kIHRvay1lbmQKICAgICAgICAg ICAgICA7OyAocHJvZ24KICAgICAgICAgICAgICA7OyAgIChnb3RvLWNoYXIgdG9rLWVuZCkKICAg ICAgICAgICAgICA7OyAgIChsb29raW5nLWF0ICJbIFx0XSokIikpCiAgICAgICAgICAgICAgKHBy b2duCiAgICAgICAgICAgICAgICAoZ290by1jaGFyIHhtbHRvay1zdGFydCkKICAgICAgICAgICAg ICAgIChsb29raW5nLWJhY2sgIl5bIFx0XSoiKSkKICAgICAgICAgICAgICA7OyBJZiBhbGwgY29u ZGl0aW9ucyBtZXQsIHJldHVybiBvcGVuaW5nIHRhZyBpbmRlbnRhdGlvbgogICAgICAgICAgICAg IChjdXJyZW50LWNvbHVtbikpKSkpKSkKCihkZWZ1biB5ay14aHRtbC1jb21wdXRlLWluZGVudC0t ZnJvbS1wcmVjZWRpbmctc2libGluZyAoKQogICJSZXR1cm4gaW5kZW50YXRpb24gcmVsYXRpdmUg dG8gdGhlIHByZWNlZGluZyBzaWJsaW5nIGVsZW1lbnQuCgpJZiB0aGUgZmlyc3QgdG9rZW4gb24g dGhlIGN1cnJlbnQgbGluZSBpcyBhbiBvcGVuaW5nIHRhZyBhbmQgdGhlCnByZXZpb3VzIGxpbmUg ZW5kcyB3aXRoIGEgY2xvc2luZyB0YWcgYW5kIHRoZSBtYXRjaGluZyBvcGVuaW5nCnRhZyBzdGFy dHMgYSBsaW5lLCByZXR1cm4gdGhlIGluZGVudGF0aW9uIG9mIHRoZSBzaWJsaW5nCmVsZW1lbnTi gJlzIG9wZW5pbmcgdGFnIGFkanVzdGVkIGJ5IHRoZSBvZmZzZXQgc3BlY2lmaWVkIGluCmB5ay14 aHRtbC1zaWJsaW5nLWluZGVudC10YWdzJyBtdWx0aXBsaWVkIGJ5CmBueG1sLWNoaWxkLWluZGVu dCcuIE90aGVyd2lzZSwgcmV0dXJuIG5pbC4KCkRlc3Ryb3lzOiB4bWx0b2sgc3RhdGUuIgogIChz YXZlLWV4Y3Vyc2lvbgogICAgKGNhdGNoICd5ay1yZXN1bHQKICAgICAgKGJhY2stdG8taW5kZW50 YXRpb24pCiAgICAgIChueG1sLXRva2VuLWFmdGVyKQogICAgICAodW5sZXNzIChlcSB4bWx0b2st dHlwZSAnc3RhcnQtdGFnKSAodGhyb3cgJ3lrLXJlc3VsdCBuaWwpKQogICAgICAobGV0ICgodGhp cy10YWctbmFtZSAoeG1sdG9rLXN0YXJ0LXRhZy1sb2NhbC1uYW1lKSkpCiAgICAgICAgKGZvcndh cmQtbGluZSAtMSkKICAgICAgICAoZW5kLW9mLWxpbmUpCiAgICAgICAgKHNraXAtY2hhcnMtYmFj a3dhcmQgIiBcdCIpCiAgICAgICAgKG54bWwtdG9rZW4tYmVmb3JlKQogICAgICAgICh1bmxlc3Mg KGVxIHhtbHRvay10eXBlICdlbmQtdGFnKSAodGhyb3cgJ3lrLXJlc3VsdCBuaWwpKQogICAgICAg IChsZXQqICgocHJlY2VkaW5nLXRhZy1uYW1lICh4bWx0b2stZW5kLXRhZy1sb2NhbC1uYW1lKSkK ICAgICAgICAgICAgICAgKHBhaXIgKGFzc29jIChsaXN0IHRoaXMtdGFnLW5hbWUgcHJlY2VkaW5n LXRhZy1uYW1lKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgeWsteGh0bWwtc2libGluZy1p bmRlbnQtdGFncykpKQogICAgICAgICAgKHVubGVzcyBwYWlyICh0aHJvdyAneWstcmVzdWx0IG5p bCkpCiAgICAgICAgICAoY29uZGl0aW9uLWNhc2UgbmlsCiAgICAgICAgICAgICAgKG54bWwtc2Nh bi1lbGVtZW50LWJhY2t3YXJk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QgKCh0YWctbmFtZSAoeG1sdG9rLXN0YXJ0LXRhZy1sb2Nh bC1uYW1lKSkKICAgICAgICAgICAgICAgKG1vcmUtdGV4dCAoc2F2ZS1leGN1cnNpb24KICAgICAg ICAgICAgICAgICAgICAgICAgICAgIChnb3RvLWNoYXIgdG9rZW4tZW5kKQogICAgICAgICAgICAg ICAgICAgICAgICAgICAgKG5vdCAobG9va2luZy1hdCAiWyBcdF0qJCIpKSkpKQogICAgICAgICAg IChsZXQgKChjbG9zaW5nLXRhZy1lbmQKICAgICAgICAgICAgICAgICAgKGNvbmRpdGlvbi1jYXNl IG5pbAogICAgICAgICAgICAgICAgICAgICAgKG54bWwtc2Nhbi1lbGVtZW50LWZvcndhcmQgKHBv aW50KSkKICAgICAgICAgICAgICAgICAgICAobnhtbC1zY2FuLWVycm9yIG5pbCkpKQogICAgICAg ICAgICAgICAgIChlb2wgKHNhdmUtZXhjdXJzaW9uCiAgICAgICAgICAgICAgICAgICAgICAgIChl bmQtb2YtbGluZSkKICAgICAgICAgICAgICAgICAgICAgICAgKHBvaW50KSkpKQogICAgICAgICAg ICAgKGxpc3QgdGFnLW5hbWUKICAgICAgICAgICAgICAgICAgIChhbmQgY2xvc2luZy10YWctZW5k CiAgICAgICAgICAgICAgICAgICAgICAgICg8PSBjbG9zaW5nLXRhZy1lbmQgZW9sKSkKICAgICAg ICAgICAgICAgICAgIG1vcmUtdGV4dCkpKSkpKQoKKGRlZnVuIHlrLXhodG1sLWNvbXB1dGUtaW5k ZW50LS1mcm9tLXByZXZpb3VzLWxpbmUgKCkKICAiQ29tcHV0ZSB0aGUgaW5kZW50YXRpb24gYmFz ZWQgb24gdGhlIHByZXZpb3VzIG5vbi1ibGFuayBsaW5lLgoKICogSWYgdGhlcmUgaXMgbm8gcHJl dmlvdXMgbGluZSwgcmV0dXJuIDAuCiAqIElmIHRoZSBwcmV2aW91cyBsaW5lIGVuZHMgd2l0aCBh IGNsb3NpbmcgdGFnCiAgIGFuZCB0aGUgY29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lc3BhY2UgbGluZQogICAgKGlm IChsb29raW5nLWF0ICJbIFx0XSokIikgOzsgZmlyc3QgbGluZSB3aGljaCBpcyBibGFuawogICAg ICAgIDAKICAgICAgKGVuZC1vZi1saW5lKQogICAgICAobGV0ICgoZW9sIChwb2ludCkpKQogICAg ICAgIChza2lwLWNoYXJzLWJhY2t3YXJkICIgXHQiKQogICAgICAgIChueG1sLXRva2VuLWJlZm9y ZSkKICAgICAgICAob3IgKGFuZCAoZXEgeG1sdG9rLXR5cGUgJ2VuZC10YWcpCiAgICAgICAgICAg ICAgICAgKHlrLXhodG1sLWNvbXB1dGUtaW5kZW50LS1mcm9tLXByZWNlZGluZy1lbGVtZW50KSkK ICAgICAgICAgICAgKHByb2duCiAgICAgICAgICAgICAgKGJhY2stdG8taW5kZW50YXRpb24pCiAg ICAgICAgICAgICAgKHBjYXNlICh5ay14aHRtbC0tb3BlbmluZy10YWcpCiAgICAgICAgICAgICAg ICAoYCgsdGFnLW5hbWUgLGNsb3NlZCAsbW9yZS10ZXh0KQogICAgICAgICAgICAgICAgIChpZiAo b3IgY2xvc2VkCiAgICAgICAgICAgICAgICAgICAgICAgICAobWVtYmVyIHRhZy1uYW1lIHlrLXho dG1sLXplcm9pbmRlbnQtdGFncykKICAgICAgICAgICAgICAgICAgICAgICAgIChhbmQgKG5vdCBt b3JlLXRleHQpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChtZW1iZXIgdGFnLW5hbWUg eWsteGh0bWwtY29uZGl0aW9uYWwtaW5kZW50LXRhZ3MpKSkKICAgICAgICAgICAgICAgICAgICAg KGN1cnJlbnQtY29sdW1uKQogICAgICAgICAgICAgICAgICAgKCsgKGN1cnJlbnQtY29sdW1uKSBu eG1sLWNoaWxkLWluZGVudCkpKQogICAgICAgICAgICAgICAgKF8gKGN1cnJlbnQtY29sdW1uKSkp KSkpKSkpCgooZGVmdW4geWsteGh0bWwtLWNvbXB1dGUtaW5kZW50ICgpCiAgIkNvbXB1dGUgaW5k ZW50YXRpb24gZm9yIHRoZSBjdXJyZW50IGxpbmUuIgogIChvciAoeWsteGh0bWwtLW5vaW5kZW50 LWVsZW1lbnRzKQogICAgICAoeWsteGh0bWwtY29tcHV0ZS1pbmRlbnQtLWZvci1jbG9zaW5nLXRh ZykKICAgICAgKHlrLXhodG1sLWNvbXB1dGUtaW5kZW50LS1mcm9tLXByZWNlZGluZy1zaWJsaW5n KQogICAgICAoeWsteGh0bWwtY29tcHV0ZS1pbmRlbnQtLWZyb20tcHJldmlvdXMtbGluZSkKICAg ICAgJ25vaW5kZW50KSkKCgooZGVmdW4geWsteGh0bWwtaW5kZW50LWxpbmUgKCkKICAiSW5kZW50 IHRoZSBjdXJyZW50IGxpbmUgc3VpdGFibHkgZm9yIFhIVE1MLiIKICAobGV0ICgoaW5kZW50ICh5 ay14aHRtbC0tY29tcHV0ZS1pbmRlbnQpKQogICAgICAgIChzYXZlcCAoPiAocG9pbnQpCiAgICAg ICAgICAgICAgICAgIChzYXZlLWV4Y3Vyc2lvbgogICAgICAgICAgICAgICAgICAgIChiYWNrLXRv LWluZGVudGF0aW9uKQogICAgICAgICAgICAgICAgICAgIChwb2ludCkpKSkpCiAgICAoaWYgKG5v dCAobnVtYmVycCBpbmRlbnQpKQogICAgICAgIGluZGVudAogICAgICAoaWYgc2F2ZXAKICAgICAg ICAgIChzYXZlLWV4Y3Vyc2lvbgogICAgICAgICAgICAoaW5kZW50LWxpbmUtdG8gaW5kZW50KSkK ICAgICAgICAoaW5kZW50LWxpbmUtdG8gaW5kZW50KSkpKSkKCihkZWZ1biB5ay14aHRtbC1pbmRl bnQtLW1heWJlLWVuYWJsZSAoKQogICJTZXQgdGhlIGN1cnJlbnQgYnVmZmVy4oCZcyBpbmRlbnRh dGlvbiBmdW5jdGlvbgp0byBgeWsteGh0bWwtaW5kZW50LWxpbmUnIGlmIHRoZSBjdXJyZW50IHNj aGVtYSBpcyDigJxodG1s4oCdLiIKICAoYW5kIChzdHJpbmdwIChjYWRkciBybmctY3VycmVudC1z Y2hlbWEpKQogICAgICAgKHN0cmluZz0gKGNhZGRyIHJuZy1jdXJyZW50LXNjaGVtYSkgImh0bWwi KQogICAgKHNldC12YXJpYWJsZSAnaW5kZW50LWxpbmUtZnVuY3Rpb24gJ3lrLXhodG1sLWluZGVu dC1saW5lICdsb2NhbCkpKQoKKHdpdGgtZXZhbC1hZnRlci1sb2FkICdueG1sLW1vZGUKICAoYWRk LWhvb2sgJ254bWwtbW9kZS1ob29rICd5ay14aHRtbC1pbmRlbnQtLW1heWJlLWVuYWJsZSkpCgoo cHJvdmlkZSAneWsteGh0bWwtaW5kZW50KQo= --000000000000c576f4056ce10021--