Skip to content

Show txt for requirements.txt in CodeBlock #164

Closed
@ydcjeff

Description

@ydcjeff

Describe the bug

Currently, there is no file extension beside Copy button for requirements.txt.

Screen Shot 2021-07-09 at 13 04 43

Expected result

Show txt beside Copy button.

Steps to reproduce

  1. Go to https://code-generator.netlify.app/create
  2. Choose a template
  3. See the requirements.txt in the right pane

Solution

Currently, we are using markup language from Prismjs for txt file which is not correct.

So change the language-markup to language-txt or language-text which don't exist in Prismjs languages. But this could allow us to add the file extension like here.

Another part is we are highlighting txt with markup. Since text files normally don't need syntax highlighting, we could just pass language grammar as empty object (i.e. languages['markup'] -> {}).


If you like to tackle this issue, please comment that you want to work on and see the contributing guide.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions