(String str)
| 785 | |
| 786 | |
| 787 | static public String removeMarkDownLinks(String str) { |
| 788 | StringBuilder name = new StringBuilder(); |
| 789 | if (str != null) { |
| 790 | int parentheses = 0; |
| 791 | for (char c : str.toCharArray()) { |
| 792 | if (c == '[' || c == ']') { |
| 793 | // pass |
| 794 | } else if (c == '(') { |
| 795 | parentheses++; |
| 796 | } else if (c == ')') { |
| 797 | parentheses--; |
| 798 | } else if (parentheses == 0) { |
| 799 | name.append(c); |
| 800 | } |
| 801 | } |
| 802 | } |
| 803 | return name.toString(); |
| 804 | } |
| 805 | } |
no test coverage detected