Github user eranwitkon commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/164#issuecomment-128293669
  
    I changed the implementation according to the new rule:
    "paragraph type will be set by the first magic word in the paragraph" this 
allows for test such as the following to be parsed as before 
    ```
    println(s"some text before magic word %table col1\tcol2\naaa\t%html 
<h3>123</h3>\n")
    ```
    
![selection_005](https://cloud.githubusercontent.com/assets/2227083/9107293/d1e3812c-3c2e-11e5-8f45-fbed7eeb2adb.png)
    
    also support omitting text before magic word so magic can be used in spark 
code
    ```
    val somerdd = sc.parallelize(1 to 10)
    println("%table key\tvalue\nrdd count   \t%html <h3>" + somerdd.count 
+"</h3>\n")
    ```
    
![selection_006](https://cloud.githubusercontent.com/assets/2227083/9107403/9ca28610-3c2f-11e5-8c9f-19e66872163f.png)
    
    one thing to note is that it is up to the first magic word to handle the 
proceeding text. e.g. %table knows how to pars %html within it. but %table 
followed by %table will be handled differently.
    ```
    println("%table col A\tcol B\naaa\t123\n")
    println("%table col Z\naaa\n123\n")
    ```
    
![selection_007](https://cloud.githubusercontent.com/assets/2227083/9107510/6e61d8ea-3c30-11e5-89b1-8e43707ebd7c.png)
    
    if no more changes, this is ready for merge
    Eran
    
     


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to