Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markdown: improved version #3236

Merged
merged 12 commits into from
Jan 2, 2022
Merged

Commits on Dec 23, 2021

  1. main: pass an extra arg to CB func called when a nesting-level is popped

    Signed-off-by: Masatake YAMATO <yamato@redhat.com>
    masatake committed Dec 23, 2021
    Configuration menu
    Copy the full SHA
    2e3d0c3 View commit details
    Browse the repository at this point in the history
  2. Markdown: rewrite the parser in C

    This parser is based on the asciidoc parser and tries to preserve all
    features of the regex-based parser (all kinds, full scope,
    sectionMarker field, running subparsers for code).
    
    Comparing with the regex based implementation, the rewritten parser
    is more than 10 times faster:
    
      [yamato@dev64]~/var/codebase% CTAGS_EXE=/home/yamato/var/ctags-github/ctags-Regex ./codebase ctags Markdown
       version: 5e6ab4b6
      features: +wildcards +regex +gnulib_regex +iconv +option-directory +xpath +json +interactive +sandbox +packcc +optscript +pcre2
      log: results/5e6ab4b6,Markdown............,..........,time......,default...,2021-12-24-00:27:22.log
      tagsoutput: /dev/null
      cmdline: + /home/yamato/var/ctags-github/ctags-Regex --quiet --options=NONE --sort=no --options=profile.d/maps --totals=yes --languages=Markdown -o - -R code/markdown-corpus code/progit code/selinux-handbook
      686 files, 322854 lines (24506 kB) scanned in 2.0 seconds (12462 kB/s)
      19246 tags added to tag file
    
      real	0m2.014s
      user	0m1.967s
      sys	0m0.035s
      + set +x
      [yamato@dev64]~/var/codebase% CTAGS_EXE=/home/yamato/var/ctags-github/ctags-C ./codebase ctags Markdown
      version: 258b9cbd
      features: +wildcards +regex +gnulib_regex +iconv +option-directory +xpath +json +interactive +sandbox +packcc +optscript +pcre2
      log: results/258b9cbd,Markdown............,..........,time......,default...,2021-12-24-00:27:34.log
      tagsoutput: /dev/null
      cmdline: + /home/yamato/var/ctags-github/ctags-C --quiet --options=NONE --sort=no --options=profile.d/maps --totals=yes --languages=Markdown -o - -R code/markdown-corpus code/progit code/selinux-handbook
      686 files, 322854 lines (24506 kB) scanned in 0.1 seconds (164033 kB/s)
      19112 tags added to tag file
    
      real	0m0.190s
      user	0m0.172s
      sys	0m0.015s
      + set +x
    
    @masatake editted the commit log, deleted old implementation, and
    implemented code for filling "end:" fields.
    techee authored and masatake committed Dec 23, 2021
    Configuration menu
    Copy the full SHA
    49ad552 View commit details
    Browse the repository at this point in the history

Commits on Dec 29, 2021

  1. Markdown: Improve handling of underlined headings

    Headings defined using underline by either '=' or '-' may contain an
    arbitrary amount of '=' or '-' characters which don't have to be equal
    to the number of characters on the previous line (which was what the
    previous code did).
    
    Special attention has to be paid to code blocks using indentation
    (either by 4 or more spaces or a \t character). For instance
    
        abcd
    ---
    
    this is a code block followed by underline, while
    
      abcd
    ---
    
    is a 'abcd' heading.
    techee committed Dec 29, 2021
    Configuration menu
    Copy the full SHA
    8b9b254 View commit details
    Browse the repository at this point in the history
  2. Markdown: Improve indentation detection

    The indent can be composed of combination of tabs and spaces and
    the previous code didn't take into account combinations like " \t".
    Fix that.
    techee committed Dec 29, 2021
    Configuration menu
    Copy the full SHA
    aae0618 View commit details
    Browse the repository at this point in the history
  3. Markdown: Fix incorrectly detected underlines

    We have to check if a sequence of '-'s is followed by a visible character
    or not to distinguish
    
    a
    - b
    
    which is a list containing 'b' and
    
    a
    -
    
    which is a heading.
    techee committed Dec 29, 2021
    Configuration menu
    Copy the full SHA
    87d0d57 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    bd8d8c4 View commit details
    Browse the repository at this point in the history

Commits on Jan 1, 2022

  1. Configuration menu
    Copy the full SHA
    d0d780e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2460571 View commit details
    Browse the repository at this point in the history
  3. Markdown: Detect ending ``` on the same line

    This isn't quite correct check as there may be multiple code spans
    on a single line and they can go over multiple lines but at least it
    fixes the case the previous regex parser handled.
    techee committed Jan 1, 2022
    Configuration menu
    Copy the full SHA
    35c6034 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3ec4209 View commit details
    Browse the repository at this point in the history
  5. Markdown: Follow uctags formatting style

    - use space between function name and (
    - use camel case instead of underline in names
    techee committed Jan 1, 2022
    Configuration menu
    Copy the full SHA
    b1bd013 View commit details
    Browse the repository at this point in the history

Commits on Jan 2, 2022

  1. Configuration menu
    Copy the full SHA
    78320f2 View commit details
    Browse the repository at this point in the history