Skip to content
This repository was archived by the owner on Nov 26, 2022. It is now read-only.
This repository was archived by the owner on Nov 26, 2022. It is now read-only.

Clarification on gophermap grammar #11

Open
@sternenseemann

Description

@sternenseemann

From the man page pygopherd(8) (shortened):

       The gophermap files contain two types of  lines,  which  are  described
       here  using  the  same  convention normally used for command line argu-
       ments.  In this section, the symbol \t will be used to indicate  a  tab
       character, Control-I.

        full line of informational text


        gophertypeDESCRIPTION [ \tselector [ \thost [ \tport ] ] ]


       Note:  spaces  shown above are for clarity only and should not actually
       be present in your file.

       […]

       The  second  type of line represents a link to a file or directory.  It
       begins with a single-character  Gopher  type  (see  Gopher  Item  Types
       below)  followed  immediately  by  a  description  and a tab character.
       There is no space or other separator between the gopher  type  and  the
       description.  The description may contain spaces but not tabs.

Following the paragraph on the second type of line, shouldn't be the grammar read like the following?

        gophertypeDESCRIPTION \t [selector [ \thost [ \tport ] ] ]

It says „followed immediately by a description and a tab character“ while the grammar suggests the
tab character and selector can be omitted together.

Haven't yet had a chance to check how it is in the code, but needs a documentation fix either way.

The impact of this difference can be seen using the following example. Consider the following gophermap line:

i'm blue

With the grammar not requiring a tab after the description, this would become an info line with the text 'm blue. If the tab was required however, it would become a info line with the text i'm blue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions