2014-08-31 6 views
7

Wie schalte ich in Jekyll intelligente Anführungszeichen und Apostrophe aus? Es bricht meinen Schluck-Rechtschreibprozess.Wie schalte ich intelligente Anführungszeichen in Jekyll aus?

Ich möchte Wörter wie doesn't mit einem einzigen geraden Zitat bleiben. Stattdessen konvertiert Jekyll sie in intelligente Anführungszeichen wie doesnt’ und ich brauche sie, um für die Rechtschreibprüfung einzeln zitiert zu bleiben.

Dies ist, was ich in meinem _config.yml versucht:

kramdown: 
    smartquotes: ["apos", "rsquo", "ldquo", "rdquo"] 

Ich verwende kramdown.

Hier ist meine ganze config:

name: Bitcoin Bulls 
markdown: kramdown 
timezone: America/Detroit 
highlighter: pygments 
author: David Smith 
safe: true 
lsi: false 
permalink: none 

url: http://www.bitcoinbulls.net 
exclude: [CNAME, Gemfile, Gemfile.lock, '*.less', gruntfile.js, custom_css, node_modules, README.md, '*.svg', '*.docx'] 
include: [glyphicons-halflings-regular.svg] 


kramdown: 
    smart_quotes: ["rdquo", "rsquo", "ldquo", "rdquo"] 


relative_permalinks: false 

defaults: 
    - 
    scope: 
     path: "" # empty string for all files 
    values: 
     layout: "default" 
    - 
    scope: 
     path: "" # empty string for all files 
     type: post 
    values: 
     layout: "post" 
     is_post: true 

Antwort

22

Der Unterstrich in smart_quotes fehlt und das zweite Array-Element sein muss apos vollständig Smart-Angebote für Apostrophe auszuschalten.

kramdown: 
    smart_quotes: ["apos", "apos", "ldquo", "rdquo"] 

Um Smart-Angebote für beide Apostrophe/Apostrophe und doppelte Anführungszeichen, verwenden Sie diese zu deaktivieren:

kramdown: 
    smart_quotes: ["apos", "apos", "quot", "quot"] 

Das ist, was als die „Welt gefällig config Programmer“ ist bekannt.


Weitere Details:

standardmäßig kramdown verwandelt apos und quot in typografische Anführungszeichen. Das heißt:

  • 'Apostroph' wird 'Apostroph'
  • "Zitat" wird „Zitat“

Die Standardkonfiguration bietet eine Anleitung:

kramdown: 

    # smart_quotes: 
    # 
    # first parameter : how an opening apostrophe is transformed 
    #      or apostrophe like in "I'm" 
    #   default : ' -> ‘ (lsquo) 
    #    apos : ' -> ' 
    # 
    # second parameter : how a closing apostrophe is transformed 
    #   default : ' -> ’ (rsquo) 
    #    apos : ' -> ' 
    # 
    # third parameter : how an opening double quote is transformed 
    #   default : " -> “ (ldquo) 
    #    quot : " -> " 
    # 
    # fourth parameter : how a closing double quote is transformed 
    #   default : " -> ” (rdquo) 
    #    quot : " -> " 
    # 
    # Default kramdown config 
    #  smart_quotes: ["rdquo", "rsquo", "ldquo", "rdquo"] 
    # 
    # Programmer's world compliant config : 
    #  smart_quotes: ["apos", "apos", "quot", "quot"] 

Wo:

  • quot = ": neutrales Anführungszeichen
  • apos = ': Apostroph wie in Ich bin
  • lsquo =': typographische Öffnung Apostroph
  • rsquo = ': typographische Schließen Apostroph
  • ldquo = „: typographische Öffnung doppelte Anführungszeichen
  • rdquo =“: typographische Schließen doppelte Anführungszeichen

Kramdown's documentation bietet weitere Optionen, die von Interesse sein können. Die Wikipedia Quotation Mark page bietet viele Details zu den Komplikationen der Interpretation und wie sich die Dinge bei Einführung von Unicode änderten.

+0

Total den Tag gerettet - danke für die Erklärung –