Skip to content

Commit 3c09fa9

Browse files
authored
Fix unknown directive warnings in c++-mode/class11 (#495)
The following warnings are emitted by yasnippet: ``` Ignoring unknown directive "desc" in file: .../yasnippet-snippets/snippets/c++-mode/class11 Ignoring unknown directive "\\${[0-9N]*" in file: .../yasnippet-snippets/snippets/c++-mode/class11 Ignoring unknown directive "References" in file: .../yasnippet-snippets/snippets/c++-mode/class11 ``` Use an unconventional ## to mark comments so yasnippet will ignore lines that contain colons.
1 parent 8af9224 commit 3c09fa9

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

snippets/c++-mode/class11

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,19 @@
44
# group: c++11
55
# uuid: d7c41f87-9b8a-479d-bb12-89f4cbdd46a7
66
# contributor: Ved Vyas
7-
# desc: Snippet for C++11 classes based on c++-mode/class. Allows for Rule of
8-
# [0, All]. A choice between ";", " = default;", and " = delete;" is presented
9-
# for each method. The methods and some of the optional keywords/specifiers are
10-
# exposed as fields that users can easily skip-and-clear.
11-
# Hackish query-replace-regexp to renumber non-mirror fields in the region
12-
# between public and protected (can use N as a field number in the snippet):
13-
# \${[0-9N]*:\([^\$]\) -> ${\,(+ 2 \#):\1
14-
# References:
15-
# 1. http://en.cppreference.com/w/cpp/language/rule_of_three#Rule_of_five
16-
# 2. https://en.wikipedia.org/wiki/Rule_of_three_%28C%2B%2B_programming%29#Example_in_C.2B.2B
17-
# 3. http://stackoverflow.com/a/4782927
7+
#
8+
## Snippet for C++11 classes based on c++-mode/class. Allows for Rule of
9+
## [0, All]. A choice between ";", " = default;", and " = delete;" is presented
10+
## for each method. The methods and some of the optional keywords/specifiers are
11+
## exposed as fields that users can easily skip-and-clear.
12+
## Hackish query-replace-regexp to renumber non-mirror fields in the region
13+
## between public and protected (can use N as a field number in the snippet):
14+
## \${[0-9N]*:\([^\$]\) -> ${\,(+ 2 \#):\1
15+
##
16+
## References
17+
## 1. http://en.cppreference.com/w/cpp/language/rule_of_three#Rule_of_five
18+
## 2. https://en.wikipedia.org/wiki/Rule_of_three_%28C%2B%2B_programming%29#Example_in_C.2B.2B
19+
## 3. http://stackoverflow.com/a/4782927
1820
# --
1921
class ${1:Name}
2022
{

0 commit comments

Comments
 (0)