Git Product home page Git Product logo

Comments (4)

jrblevin avatar jrblevin commented on July 21, 2024

I take your point about the distinction between the two levels of GitHub Flavored Markdown. Thanks for making the distinction so clear.

Aside from the newline behavior, gfm-mode also now includes support for task lists. I suppose that is harmless for people expecting only the first level, while turning on visual-line-mode is a little more intrusive. Enough people seem to want the second level though, given the number of patches I've received with these features.

How does this for a middle ground? Keep the task list support and other things (maybe nothing else currently) that would typically be invisible to people expecting level 1, but ask users wanting level 2 to add a hook to turn on visual-line-mode if desired. So, the only change would be to remove the following five lines from the gfm-mode definition (and adding a note to the documentation about creating a hook function):

;; Use visual-line-mode if available, fall back to longlines-mode:
(cond ((fboundp 'visual-line-mode)
       (visual-line-mode 1))
      ((fboundp 'longlines-mode)
       (longlines-mode 1)))

I think the next best alternative would be to create a second derived mode, but that seems unnecessary if defaulting to visual-line-mode is the only concern.

from markdown-mode.

petere avatar petere commented on July 21, 2024

I think that's reasonable for now. In the long run, it looks like a number of features from GFM are migrating to mainstream markdown (see also CommonMark). So the endgame might to have a bunch of feature toggles and then make several predefined "styles" or something like that, like "classic", "pandoc", "gfm", "commonmark", and so on. Clearly, none of those will want the line-breaking behavior, however.

from markdown-mode.

jrblevin avatar jrblevin commented on July 21, 2024

Commit da8bc8a addresses gfm-mode line wrap behavior and updates the documentation regarding GFM- and GitHub-specific features.

  1. visual-line-mode is no longer enabled by default in gfm-mode, as discussed above.
  2. The documentation been rewritten to explain in detail which GFM/GitHub features are supported by which mode (gfm-mode only, or more broadly in markdown-mode itself).
  3. Adds a gfm-mode-hook for those who want to keep visual-line-mode on by default in gfm-mode.

Please double-check what I wrote in the README.md file about the various features. There are some additional caveats, such as (read only) task lists being supported in all Markdown documents since April of 2014, despite not being supported in GFM as originally described.

from markdown-mode.

jrblevin avatar jrblevin commented on July 21, 2024

I'm closing this issue since the changes seem to be uncontroversial. If anyone has further thoughts, please feel free to re-open.

from markdown-mode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.