nadesiko3 3.3.12 → 3.3.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/nako_gen.mjs CHANGED
@@ -188,8 +188,18 @@ export class NakoGen {
188
188
  }
189
189
  }
190
190
 
191
- /** @param {string} name */
191
+ /**
192
+ * @param {string} name
193
+ * @returns {string}
194
+ */
192
195
  static getFuncName (name) {
196
+ if (name.indexOf('__') >= 0) { // スコープがある場合
197
+ const a = name.split('__')
198
+ let scope = a[0]
199
+ const name3 = NakoGen.getFuncName(a[1])
200
+ return `${scope}__${name3}`
201
+
202
+ }
193
203
  let name2 = name.replace(/[ぁ-ん]+$/, '')
194
204
  if (name2 === '') { name2 = name }
195
205
  return name2
@@ -1,7 +1,7 @@
1
1
  // なでしこバージョン
2
2
  export default {
3
- version: '3.3.12',
3
+ version: '3.3.13',
4
4
  major: 3,
5
5
  minor: 3,
6
- patch: 12
6
+ patch: 13
7
7
  }
@@ -152,5 +152,9 @@ describe('関数呼び出しテスト', () => {
152
152
  ここまで。
153
153
  `, 'OK')
154
154
  })
155
+ it('ひらがなだけの関数名がエラーになる #1214', () => {
156
+ cmp('あ。;●あとは;「A」と表示;ここまで', 'A')
157
+ cmp('おくら。;●おくらとは;「O」と表示;ここまで', 'O')
158
+ })
155
159
  })
156
160