GitHub user goi opened a pull request:

    https://github.com/apache/incubator-zeppelin/pull/164

    Improve magic display system

    I have changed the InterpreterResult behavior so that if a magic word is 
detected all preceding text is omitted. This way we can use the display system 
and print out using the magic words in paragraphs such as spark.
    example:
    ```
    sc.parallelize(1 to 10)
    ```
    will output:
    ```
    res9: org.apache.spark.rdd.RDD[Int] = ParallelCollectionRDD[2] at 
parallelize at <console>:24
    ```  
    
    and mix paragraphs such as:
    ```
    sc.parallelize(1 to 10)
    println("%table col\tcol2\nqwe\t123\n")
    ```
    will output the expected magic table
    
![selection_003](https://cloud.githubusercontent.com/assets/2227083/8849793/25ecf24c-314b-11e5-8136-ef689eaeb917.png)
    
    This behavior can be later extended to handle complex types.
    I have also added a JUnit test for the class


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/goi/incubator-zeppelin master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-zeppelin/pull/164.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #164
    
----
commit f3c4df3cf8f3238f86f98c58fb9ed6e3aef84a6f
Author: cto <[email protected]>
Date:   2015-07-23T11:49:07Z

    improve magic word handling by omitting the prefix to the magic word

----


---
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