Skip to content

Commit 6b9740b

Browse files
Add comment about raw strings to self.style
1 parent b1c357e commit 6b9740b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/libfmt_macros/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,8 @@ impl<'a> Parser<'a> {
301301

302302
fn to_span_index(&self, pos: usize) -> InnerOffset {
303303
let mut pos = pos;
304+
// This handles the raw string case, the raw argument is the number of #
305+
// in r###"..."### (we need to add one because of the `r`).
304306
let raw = self.style.map(|raw| raw + 1).unwrap_or(0);
305307
for skip in &self.skips {
306308
if pos > *skip {

0 commit comments

Comments
 (0)