Skip to content

[en] **idiocy**: Synonym arguments are not parsed correctly #1612

@cacfd3a

Description

@cacfd3a

The English word idiocy has the following Wikitext under the Synonyms header:

#: {{syn|en|idioticness|imbecility|moronicity|;|''see also'' [[Thesaurus:intelligence#Antonyms|Thesaurus:intelligence § Antonyms]]}}

Resulting in a string like:

Synonyms: idioticness, imbecility, moronicity; see also Thesaurus:intelligence § Antonyms

This result in some awkward JSON:

      "synonyms": [
        {
          "word": "idioticness"
        },
        {
          "word": "imbecility"
        },
        {
          "word": "moronicity"
        },
        {
          "word": ";"
        },
        {
          "word": "see also Thesaurus:intelligence § Antonyms"
        }
      ],

Note the semicolon is also in another section to group different senses (or something like that):

#: {{syn|en|idioticness|imbecility|moronicity<qq:all archaic in this sense>|;|mental retardation<qq:now deprecated in medical usage>|;|intellectual disability<qq:current medical terminology>}}
      "synonyms": [
        {
          "word": "idioticness"
        },
        {
          "word": "imbecility"
        },
        {
          "word": "moronicity"
        },
        {
          "word": ";"
        },
        {
          "word": "mental retardation"
        },
        {
          "word": ";"
        },
        {
          "word": "intellectual disability"
        }
      ],

I can't tell whether this is expected behaviour, since the items are just parsed as is, or whether this software should be a little bit smarter about it (i.e., recognize semicolon is also a separator).

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions