We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d301848 commit 169267eCopy full SHA for 169267e
src/languages/ruby.js
@@ -12,9 +12,9 @@ export default function(hljs) {
12
const RUBY_METHOD_RE = '([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)';
13
// TODO: move concepts like CAMEL_CASE into `modes.js`
14
const CLASS_NAME_RE = regex.either(
15
- /\b([A-Z]+[a-z0-9]+)+/,
+ /\b([A-Z]+[a-z0-9_]+)+/,
16
// ends in caps
17
- /\b([A-Z]+[a-z0-9]+)+[A-Z]+/,
+ /\b([A-Z]+[a-z0-9_]+)+[A-Z]+/,
18
)
19
;
20
const CLASS_NAME_WITH_NAMESPACE_RE = regex.concat(CLASS_NAME_RE, /(::\w+)*/)
0 commit comments