ukdor / orgfld

Implement heading folding based on * instead of #
3 stars 1 forks source link

Omit "COMMENT" and ":noexport:" as heading lines #2

Closed ukdor closed 6 years ago

ukdor commented 6 years ago

Example:

" COMMENT Table" should not be considered a heading " :noexport:" should not be considered a heading

NOTE: This will also catch any heading where "COMMENT" or ":noexport:" are found on the line.

Coding example:

Within main.js, add the following to "export function * headingLevels (tokens) {":

    let isCommentLine = token.text.match(/^(\*+ ).*(COMMENT)/)
    let isNoexportLine = token.text.match(/^(\*+ ).*(:noexport:)/)
    if (token.type !== 'code' && !isCommentLine && !isNoexportLine) {
ukdor commented 6 years ago

Closed in version 0.7.0