pluralsight / guides-cms

DEPRECATED - Markdown based CMS with Github repository as persistent storage
http://www.pluralsight.com/guides/
GNU Affero General Public License v3.0
108 stars 35 forks source link

Highlight JS issue on Python doc strings #100

Closed paulocheque closed 8 years ago

paulocheque commented 8 years ago

This does not work: the docstring has not been highlighted.

    def lowerfirst(string):
    """
    This function takes an input string, and if the string is equal to the word I, it will simply return that word.
    This function takes an input string, and if the string is equal to the word I, it will simply return that word
    However, if the string is not equal to I, it will attempt to lower the first letter by assigning it to a temporary
    variable, tmp, and will then append all following letters to it, returning this value once finished
    WARNING: This will break if the word given is only 1 letter long and not equal to I
    """

    if string == "I":
        return string
    else:
        tmp = string[0].lower()
        for i in range(1,len(str)):
            tmp += i
        return tmp

This does work:

    def lowerfirst(string):
    """
    This function takes an input string, and if the string is equal to the word I, it will simply return that word.
    This function takes an input string, and if the string is equal to the word I, it will simply return that word
    However, if the string is not equal to I, it will attempt to lower the first letter by assigning it to a temporary
    variable, tmp, and will then append all following letters to it, returning this value once finished
    WARNING: This will break if the word given is only 1 letter long and not equal to I
    """

    """
    fix
    """

    if string == "I":
        return string
    else:
        tmp = string[0].lower()
        for i in range(1,len(str)):
            tmp += i
        return tmp
paulocheque commented 8 years ago

The PR https://github.com/pluralsight/guides-cms/pull/86 fixed that

durden commented 8 years ago

Tested and verified this is fixed on production due to the changes referenced above.