8000 stop doc literal normalization unindenting lines that start with @[...] by atacratic · Pull Request #1180 · unisonweb/unison · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

stop doc literal normalization unindenting lines that start with @[...] #1180

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 26, 2020

Conversation

atacratic
Copy link
Contributor

Unison was wrongly removing some leading spaces from some lines of doc literals.

The langref includes the following example:

List.take.apiDocs : Doc
List.take.apiDocs = [:
`@List.take n [1,2,3]` returns the first `n` elements of
a list. This is efficient and takes just `O(log n)` operations.

## Example

  @[source]   examples.List.take.ex1
  ⧩
  @[evaluate] examples.List.take.ex1

## Also see

  * The `@List` type
  * The `@[signature] List.drop` function
  * More about finger trees (used to implement `@List`) here: `@docs.fingerTrees`
:]

Unison was removing the spaces at the start of the @[source] and @[evaluate] lines.

I'll merge this sometime soon.

@atacratic atacratic self-assigned this Jan 26, 2020
Copy link
Member
@pchiusano pchiusano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😎👍

@atacratic atacratic merged commit 46e3b13 into master Jan 26, 2020
@atacratic atacratic deleted the topic/doc-normalization-unindenting-fix branch January 26, 2020 22:33
@aryairani aryairani mentioned this pull request Mar 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0