Last active
October 3, 2016 09:50
-
-
Save sebaslogen/747259f3d384d18b9146f5257444d774 to your computer and use it in GitHub Desktop.
Autocorrect suggestion: Escape apostrophes in Android string XMLs (file should be inside .idea/inspectionProfiles/)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<component name="InspectionProjectProfileManager"> | |
<profile version="1.0"> | |
<option name="myName" value="Project Default" /> | |
<inspection_tool class="AndroidLintDrawAllocation" enabled="true" level="ERROR" enabled_by_default="true" /> | |
<inspection_tool class="SSBasedInspection" enabled="true" level="ERROR" enabled_by_default="true"> | |
<replaceConfiguration name="Escape apostrophes in Android string XMLs" text="<string $attributes$>$text$</string>" recursive="false" caseInsensitive="true" type="XML" reformatAccordingToStyle="true" shortenFQN="true" useStaticImport="true" replacement="<string $attributes$>$fixedText$</string>"> | |
<constraint name="attributes" minCount="0" maxCount="2147483647" within="" contains="" /> | |
<constraint name="text" regexp=".*[^\\]'.*" maxCount="2147483647" within="" contains="" /> | |
<variableDefinition name="fixedText" script=""text.getValue().replaceAll( "\\\\'|\'", "\\\\'" )"" /> | |
</replaceConfiguration> | |
</inspection_tool> | |
</profile> | |
</component> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment