Skip to content

Commit

Permalink
Multiline raw strings in Rust
Browse files Browse the repository at this point in the history
Fixes #1527
  • Loading branch information
isagalaev committed May 23, 2017
1 parent 887f042 commit df7613c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/languages/rust.js
Expand Up @@ -51,7 +51,7 @@ function(hljs) {
{
className: 'string',
variants: [
{ begin: /r(#*)".*?"\1(?!#)/ },
{ begin: /r(#*)"(.|\n)*?"\1(?!#)/ },
{ begin: /b?'\\?(x\w{2}|u\w{4}|U\w{8}|.)'/ }
]
},
Expand Down
3 changes: 2 additions & 1 deletion test/markup/rust/strings.expect.txt
Expand Up @@ -10,4 +10,5 @@

<span class="hljs-string">r"hello"</span>;
<span class="hljs-string">r###"world"###</span>;
<span class="hljs-string">r##" "### "# "##</span>;
<span class="hljs-string">r##" "###
"# "##</span>;
3 changes: 2 additions & 1 deletion test/markup/rust/strings.txt
Expand Up @@ -10,4 +10,5 @@ b"hello";

r"hello";
r###"world"###;
r##" "### "# "##;
r##" "###
"# "##;

0 comments on commit df7613c

Please sign in to comment.