Permalink
Commits on Jul 28, 2017
  1. Merge pull request #379 from bep/guillemets

    rtfb committed on GitHub Jul 28, 2017
    Add Smartypants support for French Guillemets
Commits on Jul 27, 2017
  1. Add Smartypants support for French Guillemets

    bep committed Jul 22, 2017
    This commits adds flag `HTML_SMARTYPANTS_QUOTES_NBSP` which, when combined with `HTML_USE_SMARTYPANTS` will insert non-breaking spaces between the double quotes and the contained text.
    
    This is mostly relevant for use in French  with `HTML_SMARTYPANTS_ANGLED_QUOTES`.
    
    It should not hurt existing code path in the performance department:
    
    ```
    name                     old time/op    new time/op    delta
    SmartDoubleQuotes-4    2.58µs ± 1%    2.58µs ± 1%   ~             (p=1.000 n=5+5)
    
    name                     old alloc/op   new alloc/op   delta
    SmartDoubleQuotes-4    5.27kB ± 0%    5.27kB ± 0%   ~     (all samples are equal)
    
    name                     old allocs/op  new allocs/op  delta
    SmartDoubleQuotes-4      13.0 ± 0%      13.0 ± 0%   ~     (all samples are equal)
    ```
    
    Fixes #378
Commits on Jun 10, 2017
  1. Merge pull request #366 from choueric/master

    rtfb committed on GitHub Jun 10, 2017
    fix duplicate and recursive footnotes. (#241)
  2. use map[string]struct{} as a set.

    choueric committed Jun 10, 2017
    Use map[string]struct{} instead of map[string]bool to implement a set
    and reduce memory space.
Commits on Jun 9, 2017
  1. add 'notesRecord' to check footnote existence fast

    choueric committed Jun 9, 2017
    It is necessary to use vector for 'notes' instead of map to keep
    footnotes ordered. But checking for presence in a vector is not
    efficient. So add a map variable 'notesRecord' to tackle this problem.
Commits on Jun 8, 2017
  1. fix duplicate and recursive footnotes. (#241)

    choueric committed Jun 8, 2017
    Fix the infinite loop when there is a self-refer footnote by checking if
    the reference is already added into parser.notes.
    
    It also fixes of creating duplicate footnotes through this modification.
    
    Add coresponding testcase.
Commits on May 9, 2017
  1. Document SanitizedAnchorName algorithm, copy implementation. (#352)

    shurcooL committed on GitHub May 9, 2017
    The goal of this change is to reduce number of non-standard library
    packages (repositories) that blackfriday imports from 1 to 0, and in
    turn, reduce the cost of importing blackfriday into other projects.
    
    Do so by documenting the algorithm of SanitizedAnchorName, and include
    a copy of the small function inside blackfriday itself. The same
    functionality continues to be available in the original location,
    github.com/shurcooL/sanitized_anchor_name.Create. It can be used by
    existing users and those that look for a small package, and don't need
    all of blackfriday functionality. Existing users of blackfriday can use
    the new SanitizedAnchorName function directly and avoid an extra
    package import.
    
    Resolves #350.
Commits on Apr 13, 2017
  1. Merge pull request #334 from choueric/master

    rtfb committed on GitHub Apr 13, 2017
    add an extension to handle Chinese (or CJK) newlines.
Commits on Mar 17, 2017
  1. modify testcase of joinLine.

    choueric committed Mar 17, 2017
    1. delete testdata 'zhJoinLines.txt'.
    2. move the testcase from markdown_test.go into block_test.go.
Commits on Feb 22, 2017
  1. add extension to join lines

    choueric committed Feb 22, 2017
Commits on Oct 3, 2016
  1. Document using fenced code blocks with bluemonday (#309)

    dunglas committed with rtfb Oct 3, 2016
    Document using fenced code blocks with bluemonday
Commits on Sep 9, 2016
  1. Set LIST_ITEM_END_OF_LIST when list is at end of document. (#305)

    shurcooL committed on GitHub Sep 9, 2016
    The LIST_ITEM_END_OF_LIST flag is an internal flag passed to renderers
    when rendering list items. It's normally set for the last item in the
    list.
    
    This change fixes the issue where that flag wasn't set in situations
    where the Markdown document ends with the list being the last block
    level item in it.
    
    The cases above detect and set LIST_ITEM_END_OF_LIST flag when the list
    ends because another thing begins, but they miss it when the end of
    document is reached.
    
    No tests here because this subtle internal behavior is hard to test and
    would require quite a bit of testing/mock infrastructure.
    
    Helps shurcooL/markdownfmt#30.
Commits on Jul 16, 2016
  1. Make newline mandatory for opening fence line. (#281)

    shurcooL committed on GitHub Jul 16, 2016
    This was an unintended typo/mistake in #280.
    
    This is stricter, and it's fine. The opening fence line will always need to have a newline.
    
    Add another test for isFenceLine.
Commits on Jul 15, 2016
  1. Merge pull request #280 from russross/fix-279-and-refactor

    rtfb committed on GitHub Jul 15, 2016
    Fix fenced code block rendering with content resembling references.
  2. Improve fenced code block detection for first pass.

    shurcooL committed Jul 15, 2016
    In first pass, there may not be a trailing newline after a fenced code
    block yet. Make newline optional in isFenceLine when calling
    fencedCodeBlock to detect the fenced code block it anyway. This is more
    complex, but it avoids creating temporary buffers or modifying input in
    order to maintain performance (see #148).
    
    Document and rename fencedCode to fencedCodeBlock.
    
    Add regression tests.
    
    Fixes #279.
  3. Improve fence line detection.

    shurcooL committed Jul 15, 2016
    Rename isFenceCode to isFenceLine, document it, add tests.
    
    Add support for making newline optional, this will be needed in future
    commits.
  4. Create a place for document-level unit tests.

    shurcooL committed Jul 15, 2016
    These will be helpful for catching regressions or changes in behavior
    to edge cases such as empty input, or specifically crafted inputs that
    may cause panics, etc.
    
    Move test for issue #172 there since it's a document-level test, not an
    inline one.
    
    Add test for issue #173.
    
    Make some things more consistent.
    
    Don't use a named receiver in methods that don't use it. This makes the
    code more readable since one can more quickly tell the inputs to the
    method.
Commits on May 31, 2016
  1. Merge pull request #266 from russross/avoid-unneeded-break

    rtfb committed May 31, 2016
    Avoid unneeded break statement.
Commits on May 25, 2016
  1. Avoid unneeded break statement.

    shurcooL committed May 25, 2016
    This is purely a style change with no behavior difference.
    
    In Go (unlike most other languages), case statements in a switch
    don't need an explicit break statement, it happens by default. Adding
    it explicitly is possible, but has no effect.
    
    In this case, having the break statement hurts readability because
    it's hard to tell if it's a mistake, and the break was intended to
    break out of the outer for loop, rather than do nothing for the switch
    statement. So, remove it, to make it more clear that there is no
    bug here.
Commits on May 10, 2016
  1. Merge pull request #264 from moorereason/iss263

    rtfb committed May 10, 2016
    Fix definition lists that contain other lists
Commits on May 6, 2016
Commits on May 2, 2016
  1. Merge pull request #261 from moorereason/iss235

    rtfb committed May 2, 2016
    Fix adjacent list merging
  2. Fix adjacent list merging

    moorereason committed May 2, 2016
    Prevent adjacent lists of differing types from being merged into a
    single list.  No options are provided to enable the previous behavior.
    
    Fixes #235
Commits on Apr 29, 2016
  1. Travis: Run gofmt -s, go vet, go test -race, add Go 1.6.

    shurcooL committed Apr 29, 2016
    Also make tip a fast-finish allowed failure. That way, if CI fails on
    tip due to a temporary issue with tip, it will not break build status.
    However, it's still possible to see tip build status by looking at CI
    details page.
    
    Do not run go vet with Go 1.4 or older since it's not included in the
    standard library, and it's no longer available in external standard
    library.
    
    Add godoc badge to README.md.
Commits on Apr 21, 2016
  1. Merge pull request #250 from tomkwok/master

    rtfb committed Apr 21, 2016
    Fix regession: index out of range panic in reference link (#172, #173)
Commits on Apr 3, 2016
  1. Add test for issue 172

    tomkwok committed Apr 3, 2016
Commits on Apr 2, 2016
Commits on Mar 16, 2016
  1. Merge pull request #247 from shawnps/patch-1

    rtfb committed Mar 16, 2016
    fix typo
  2. fix typo

    shawnps committed Mar 16, 2016
Commits on Jan 24, 2016
  1. Merge pull request #234 from shawnps/gofmt

    rtfb committed Jan 24, 2016
    gofmt -s
Commits on Jan 23, 2016
  1. gofmt -s

    shawnps committed Jan 23, 2016
Commits on Dec 30, 2015
  1. Merge pull request #229 from russross/issue-228

    rtfb committed Dec 30, 2015
    Fix bug with gathering list item lines
Commits on Dec 26, 2015
  1. Fix bug with gathering list item lines

    rtfb committed Dec 26, 2015
    Instead of swallowing an empty line and then reintroducing it back again
    in certain cases, collect the list item body in an unaltered form and
    let the recursive parsing call sort things out.
    
    Fixes issue #228.
Commits on Dec 25, 2015
  1. Merge pull request #225 from russross/issue-165

    rtfb committed Dec 25, 2015
    Implement support for CDATA section