Skip to content

Commit 8fc8394

Browse files
committed
Fix case of RoleMapOpts
1 parent e99004d commit 8fc8394

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/structure.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1267,7 +1267,7 @@ impl StructRole2 {
12671267
StructRole2Compat::Compatible(StructRole::H6)
12681268
}
12691269
Self::Heading(_) => StructRole2Compat::RoleMapping(
1270-
if opts.contains(RoleMapOpts::map_hn_to_h6) {
1270+
if opts.contains(RoleMapOpts::MAP_HN_TO_H6) {
12711271
StructRole::H6
12721272
} else {
12731273
StructRole::P
@@ -1277,15 +1277,15 @@ impl StructRole2 {
12771277
StructRole2Compat::Compatible(StructRole::StructuredHeading)
12781278
}
12791279
Self::Title => StructRole2Compat::RoleMapping(
1280-
if opts.contains(RoleMapOpts::map_title_to_h1) {
1280+
if opts.contains(RoleMapOpts::MAP_TITLE_TO_H1) {
12811281
StructRole::H1
12821282
} else {
12831283
StructRole::P
12841284
},
12851285
),
12861286
Self::FENote => StructRole2Compat::RoleMapping(StructRole::Note),
12871287
Self::Sub => StructRole2Compat::RoleMapping(
1288-
if opts.contains(RoleMapOpts::map_sub_to_span) {
1288+
if opts.contains(RoleMapOpts::MAP_SUB_TO_SPAN) {
12891289
StructRole::Span
12901290
} else {
12911291
StructRole::Div
@@ -1374,13 +1374,13 @@ bitflags::bitflags! {
13741374
pub struct RoleMapOpts: u8 {
13751375
/// Whether to map headings with levels higher than 6 to [`StructRole::H6`]
13761376
/// (`true`) or [`StructRole::P`] (`false`).
1377-
const map_hn_to_h6 = 1 << 0;
1377+
const MAP_HN_TO_H6 = 1 << 0;
13781378
/// Whether to map the `Title` role to [`StructRole::H1`] (`true`) or
13791379
/// [`StructRole::P`] (`false`).
1380-
const map_title_to_h1 = 1 << 1;
1380+
const MAP_TITLE_TO_H1 = 1 << 1;
13811381
/// Whether to map the `Sub` role to [`StructRole::Span`] (`true`) or
13821382
/// [`StructRole::Div`] (`false`).
1383-
const map_sub_to_span = 1 << 2;
1383+
const MAP_SUB_TO_SPAN = 1 << 2;
13841384
}
13851385
}
13861386

0 commit comments

Comments
 (0)