Skip to content
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

Adding HTML active patterns to expose internals of HtmlNode. #1227

Merged
merged 1 commit into from
Sep 10, 2019

Conversation

NatElkins
Copy link
Contributor

Support for #1102

@NatElkins
Copy link
Contributor Author

Oops, forgot that my editor deletes whitespace on save. Hopefully that's not a big deal.

BTW, this can be tested as follows:

// Learn more about F# at http://fsharp.org

open System
open FSharp.Data
open FSharp.Data.HtmlActivePatterns

[<EntryPoint>]
let main argv =
    let doc = HtmlDocument.Load("")
    let elements = doc.Elements()
    elements
    |> Seq.iter(fun element ->
        match element with
        | HtmlElement (content, thing, other) ->
            let (HtmlAttribute t) = List.head thing
            printfn ""
        | HtmlText (content) -> printfn ""
        | HtmlComment (content) -> printfn ""
        | HtmlCData (content) -> printfn ""
    )
    printfn "Hello World from F#!"
    0 // return an integer exit code

@dsyme
Copy link
Contributor

dsyme commented Mar 21, 2019

Close/open to re-run CI

@dsyme dsyme closed this Mar 21, 2019
@dsyme dsyme reopened this Mar 21, 2019
Copy link

@hcoona hcoona left a comment

Choose a reason for hiding this comment

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

LGTM

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.

3 participants