huggingface / huggingface/doc-builder

How to ignore some line when applying style?

Open
#564 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
144
Forks
59
Avg merge
2d 5h
Merged PRs (30d)
13

Description

I have this in my code:

```python
expected_output = textwrap.dedent("""\
╭────────────────────── Step 42 ───────────────────────╮
│ ┏━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━┓ │
│ ┃ Prompt ┃ Completion ┃ Correctness ┃ Format ┃ │
│ ┡━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━┩ │
│ │ The sky is │ blue. │ 0.12 │ 0.79 │ │
│ ├────────────┼──────────────┼─────────────┼────────┤ │
│ │ The sun is │ in the sky. │ 0.46 │ 0.10 │ │
│ └────────────┴──────────────┴─────────────┴────────┘ │
╰──────────────────────────────────────────────────────╯
""")
```

And it gets reformatted into this:

```python
expected_output = textwrap.dedent("""\
╭────────────────────── Step 42 ───────────────────────╮ │ ┏━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━┓
│ │ ┃ Prompt ┃ Completion ┃ Correctness ┃ Format ┃ │ │ ┡━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━┩ │ │
│ The sky is │ blue. │ 0.12 │ 0.79 │ │ │ ├────────────┼──────────────┼─────────────┼────────┤ │ │ │ The sun is
│ in the sky. │ 0.46 │ 0.10 │ │ │ └────────────┴──────────────┴─────────────┴────────┘ │
╰──────────────────────────────────────────────────────╯
""")
```

is there a way to avoid this?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.