Skip to content

Bug: When counting hashes for identifying heading_level, should disregard hashes after space #12

@sda030

Description

@sda030
---
format: html
---
# This a level-1 heading

## This is a level-2 heading

## This is also a level-2 heading but counted as level-3 heading because of label{#sec-heading-no-2}
lightparser::split_to_tbl("C:/Users/py128/OneDrive - NIFU/Downloads/Quarto_testing/test_lightparser.qmd")
#> It seems you are currently knitting a Rmd/Qmd file. The parsing of the file will be done in a new R session.
#> # A tibble: 6 × 8
#>   type    label params           text        code  heading heading_level section
#>   <chr>   <lgl> <list>           <named lis> <lis> <chr>           <dbl> <chr>  
#> 1 yaml    NA    <named list [1]> <lgl [1]>   <lgl> <NA>               NA <NA>   
#> 2 heading NA    <lgl [1]>        <chr [1]>   <lgl> This a…             1 This a…
#> 3 inline  NA    <lgl [1]>        <chr [1]>   <lgl> <NA>               NA This a…
#> 4 heading NA    <lgl [1]>        <chr [1]>   <lgl> This i…             2 This i…
#> 5 inline  NA    <lgl [1]>        <chr [1]>   <lgl> <NA>               NA This i…
#> 6 heading NA    <lgl [1]>        <chr [1]>   <lgl> This i…             3 This i…

Created on 2024-06-07 with reprex v2.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions