File tree Expand file tree Collapse file tree 4 files changed +24
-4
lines changed
java/com/andrewbrookins/idea/wrap
test/java/com/andrewbrookins/idea/wrap Expand file tree Collapse file tree 4 files changed +24
-4
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ plugins {
55}
66
77group ' com.andrewbrookins.idea.wrap'
8- version ' 1.5 .0-SNAPSHOT'
8+ version ' 1.6 .0-SNAPSHOT'
99
1010sourceCompatibility = 1.8
1111
@@ -25,7 +25,12 @@ intellij {
2525patchPluginXml {
2626 sinceBuild = " 141"
2727 changeNotes = """
28- <b>1.5.0</b>
28+ <b>1.6.0</b>
29+ <ul>
30+ <li>Support SQL comments. Thanks, Elijah Carrel!</li>
31+ </ul>
32+
33+ <b>1.5.0</b>
2934 <ul>
3035 <li>Fix plugin XML compatibility with newer Intellij versions.</li>
3136 <li>Special thanks to <b>Edgars Irmejs</b> and <b>Aleksei Kniazev</b> for fixes!</li>
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import java.util.regex.Pattern
1010 * This code was inspired by Nir Soffer's codewrap library: * https://pypi.python.org/pypi/codewrap/
1111 */
1212class CodeWrapper (
13- private val commentRegex : Regex = " (/\\ *+|\\ */|\\ *|\\ .|#+|//+|;+)?" .toRegex(),
13+ private val commentRegex : Regex = " (/\\ *+|\\ */|\\ *|\\ .|#+|//+|;+|-- )?" .toRegex(),
1414
1515 private val newlineRegex : Regex = " (\\ r?\\ n)" .toRegex(),
1616
Original file line number Diff line number Diff line change 11<idea-plugin >
22 <id >com.andrewbrookins.wrap_to_column</id >
33 <name >Wrap to Column</name >
4- <version >1.5 .0</version >
4+ <version >1.6 .0</version >
55 <vendor email =" a@andrewbrookins.com" url =" http://andrewbrookins.com" >Andrew Brookins</vendor >
66
77 <description ><![CDATA[
3535 ]]> </description >
3636
3737 <change-notes ><![CDATA[
38+ <b>1.6.0</b>
39+ <ul>
40+ <li>Support SQL comments. Thanks, Elijah Carrel!</li>
41+ </ul>
42+
3843 <b>1.5.0</b>
3944 <ul>
4045 <li>Fix plugin XML compatibility with newer Intellij versions.</li>
Original file line number Diff line number Diff line change @@ -196,5 +196,15 @@ class CodeWrapperTests {
196196
197197 assertEquals(expected, text)
198198 }
199+
200+ @Test
201+ fun testWrapsSqlComments () {
202+ val text = wrapper.wrap(" -- This is a SQL comment. It may not be an important comment, but it's mine. My own. My precious." )
203+
204+ val expected = " -- This is a SQL comment. It may not be an important comment, but it's\n " +
205+ " -- mine. My own. My precious."
206+
207+ assertEquals(expected, text)
208+ }
199209}
200210
You can’t perform that action at this time.
0 commit comments