From 38a7670ea225a07d9deea8680e63075c84cae53d Mon Sep 17 00:00:00 2001 From: Alexander Schwartz Date: Sun, 3 Nov 2024 19:46:16 +0100 Subject: [PATCH] Allow disabling validation on individual code blocks (#830) --- CHANGELOG.adoc | 1 + .../images/hide-errors-in-source-blocks.png | Bin 0 -> 20867 bytes .../faq/validation-for-asciidoc-files.adoc | 34 +++++++++++ .../CodeFenceHighlightInfoFilter.java | 5 +- .../psi/AsciiDocElementWithLanguage.java | 4 ++ .../intellij/psi/AsciiDocListing.java | 56 +++++++----------- 6 files changed, 63 insertions(+), 37 deletions(-) create mode 100644 doc/users-guide/modules/ROOT/images/hide-errors-in-source-blocks.png diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 355d54bdc..6807a50e3 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -11,6 +11,7 @@ This document provides a high-level view of the changes introduced by release. - Clear lock for JCEF preview to prevent a blank preview every time you open an AsciiDoc file (#1610) - Notify user when an Antora component descriptor misses the name (#1728) +- Allow disabling validation on individual code blocks (#830) === 0.43.2 diff --git a/doc/users-guide/modules/ROOT/images/hide-errors-in-source-blocks.png b/doc/users-guide/modules/ROOT/images/hide-errors-in-source-blocks.png new file mode 100644 index 0000000000000000000000000000000000000000..f87138d3655a6956f73094b0013e05583d9df66d GIT binary patch literal 20867 zcmb@uby!qu+xM>`5)z7nG}7HIrH*tf@6XnPa!^m{%P6u zG5*mbSuxR1ALJc1cN<*fUn@19y7*}gK4V(pH2({{qI^f9D|rC zR)&B0G5b-x2ogGsPNVRz3KSAV@k?bk!1wFoGUg2nd^Tjr^hBtTgcC0=Gb}Tu4w;3b zQNgXCaC(f*a3`8~;Oa)U!DPb0<2<8|FgF*k#r_5b`YewgB_M`jJ%$~86-GkAc{qsp zMhpi#uw-EZ!v20F_00R>;$L0ALLaW>!og;FI70~scm_LI1lAgWx8mL@5g19|SnT>b zsP6t!Sj@GG%6R#8yIJy8tNq4Quze+<$G*IjfZkM?b!Mo|o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yy3XmamdL9+Nd~Sh^+SK+sha_3ZZQ`HPwvTEshb-`+^)}je}9)_|>zklMM5W{h++t)ioB;ss+W|uKS{V8wQke zYUaGksa!9100-a zm1=&p3_fKQwf)Eia|)NK5qN~Nq@@3B_yuz#oo6J&~;KMppdDQ5zaGG>Q}=IRPSGBngHRc zB2*8V6qk|#!175ELi?5Y2IJMey3oN(;_Fe`y4@P~@ETO+d-^E{ zG;5bIPB%#TK+e@$*qwG{)P98kx?V>@#>CsZ``CBzY`u=>7dbo+@z}b)e6->-ti9s3 zs954{tVaDJ$5z^Xi1k>egzq`}s531x1sgRg7J&uOmfGS;JR+H&Fh>g?4pC>6PCY9h zO>b*QAOWYL?g5;JU^@lwRr_C6&h11Dcp7lHNG}10P)8~WYXeiG%CkS=VZL#)WK?~LBZm~js?RQ(eGF@(h3cB2y@0<_mZ z47elFHs{lm8uAV5fw=syBts`z=@rFTjHM9uajId%hmry_0C!*Qy?lGDwj_&%dk3SI zor?H|TBy7MSUP#|`UyTM$t6y5L)IrfGG)Gf%a=7t2?$ib${X~;uQX4k!Fce`Hb}3@|rg zX#fF2@_E&_ve;HsfWO$4Q*d)1J3aUZjV!5`)>x5$oty8qa*d9zg)fXv4uZ)y|6O$B zLIsslx3&*#z*CeD@gq}avuk`TvD<)g`e_>XrYDk{5vZa1Xf3e_clHj?0a0$2UrFTV z#FQ@krg3X>?)>8hMNm9aH+erSOh=w~6up~8bcwI}98^(F_X)4<8@)aw*PBcqFaefW z`>N=Dnb~zm+?yG=^h%Jeh(ecI=A|?Y==SRXgQD+EKh3E0z?nhwo@t&TJO}B5ds>@B z+O%w5A}8?-_CpL!=+X%4g_68b$Cr6OsU<{9kDCqeXlA?1OP1XGgED>205-EDW%3<+ zSPJZJ{OWw`7~H>U<(f~52h>H!Mft0?bmk$C@ createLiteralTextEscaper() { - return new LiteralTextEscaper(this) { - @Override - public boolean decode(@NotNull TextRange rangeInsideHost, @NotNull StringBuilder outChars) { - outChars.append(rangeInsideHost.substring(myHost.getText())); - return true; - } - - @Override - public int getOffsetInHost(int offsetInDecoded, @NotNull TextRange rangeInsideHost) { - return rangeInsideHost.getStartOffset() + offsetInDecoded; - } - - @NotNull - @Override - public TextRange getRelevantTextRange() { - return myHost.getContentTextRange(); - } - - @Override - public boolean isOneLine() { - return false; + public boolean validateContent() { + final PsiElement element = findPsiChildByType(AsciiDocElementTypes.BLOCK_ATTRIBUTES); + if (element != null) { + AsciiDocBlockAttributes blockAttributes = PsiTreeUtil.findChildOfType(this, AsciiDocBlockAttributes.class); + if (blockAttributes != null) { + String[] attr = blockAttributes.getAttributes(); + if (attr.length > 0 && attr[0].contains("%novalidate")) { + return false; + } + String opts = blockAttributes.getAttribute("opts"); + if (opts != null) { + for (String opt : opts.split(",")) { + if (opt.trim().equals("novalidate")) { + return false; + } + } + } } - }; + } + return true; } @Override @@ -82,7 +66,7 @@ public String getFenceLanguage() { return null; } else if (attr.length >= 1) { firstAttr = attr[0]; - int locationOfPercent = firstAttr.indexOf("%"); // this handles for example "plantuml%interactive" + int locationOfPercent = firstAttr.indexOf("%"); // this handles, for example, "plantuml%interactive" if (locationOfPercent != -1) { firstAttr = firstAttr.substring(0, locationOfPercent); }