-
Notifications
You must be signed in to change notification settings - Fork 15
Add syntax for tables #11
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
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
82af0c3
Add syntax for tables
gpetiot 94bddbd
Replace let>> with >>>
gpetiot cd1f507
Simplify alignment
gpetiot bca4972
join_list without exception
gpetiot 0e7e528
Convert light table contents to nestable block elements
gpetiot 6237d0f
Do not allow alignment in heavy tables
gpetiot 9c34050
Typo
gpetiot 486fd61
Preserve td/th in the datatype
gpetiot e3738d0
Renaming
gpetiot 36d381a
Warn new lines in markup nested in light tables
panglesd bdfeef1
Add suggestion on wrong content inside `{table }` and `{`tr }`
panglesd bd19b75
allow `|` char as a word outside of light table
panglesd d72b51c
adding a test for varying number of cells
panglesd 55a4197
Merge pull request #1 from panglesd/tables
gpetiot 97fd2a3
Fix new paragraph starting on `|`
panglesd d20885a
Merge pull request #2 from panglesd/tables
gpetiot 361354c
Fix default alignment
panglesd 497fe75
Merge pull request #3 from panglesd/tables
gpetiot 1199bd4
Handle '+' to separate columns in 'align' row
gpetiot 53d2161
Renaming data->grid in tests, data is a kind of a cell
gpetiot a6f0526
Revert 1199bd4
gpetiot 86583cc
Alternate method of invalid light table syntax
jonludlam File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
module Option = struct | ||
type 'a t = 'a option = None | Some of 'a | ||
|
||
let is_some = function None -> false | Some _ -> true | ||
|
||
let value_exn = function | ||
| None -> failwith "Option.value_exn None" | ||
| Some x -> x | ||
|
||
let join_list l = | ||
if List.for_all is_some l then Some (List.map value_exn l) else None | ||
gpetiot marked this conversation as resolved.
Show resolved
Hide resolved
|
||
end | ||
|
||
module Char = struct | ||
include Char | ||
|
||
let equal (x : char) y = x = y | ||
end | ||
|
||
module String = struct | ||
include String | ||
|
||
let for_all f str = | ||
let rec aux i = | ||
if i >= String.length str then true | ||
else if f (String.get str i) then aux (i + 1) | ||
else false | ||
in | ||
aux 0 | ||
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
(** @since 4.08 *) | ||
module Option : sig | ||
type 'a t = 'a option = None | Some of 'a | ||
|
||
val is_some : 'a option -> bool | ||
(** [is_some o] is [true] if and only if [o] is [Some o]. *) | ||
|
||
val join_list : 'a option list -> 'a list option | ||
end | ||
|
||
module Char : sig | ||
include module type of Char | ||
|
||
val equal : t -> t -> bool | ||
(** The equal function for chars. | ||
@since 4.03.0 *) | ||
end | ||
|
||
module String : sig | ||
include module type of String | ||
|
||
val for_all : (char -> bool) -> string -> bool | ||
(** [for_all p s] checks if all characters in [s] satisfy the preficate [p]. | ||
@since 4.13.0 *) | ||
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.